guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#61946] [PATCH 0/6] gnu: golang: Add minify


From: Hilton Chain
Subject: [bug#61946] [PATCH 0/6] gnu: golang: Add minify
Date: Thu, 01 Feb 2024 11:10:39 +0800

Hi Sharlatan,

On Wed, 31 Jan 2024 07:17:29 +0800,
Sharlatan Hellseher wrote:
>
> [1  <text/plain (quoted-printable)>]
>
> Hi Thomas and Hilton,
>
> I've tried to resolved all highlights which Hilton pointed out and from
> some investigation I've left with 3 pushed patches.
>
> - present [3/3]
>   - [X] go-github-com-tdewolff-parse-v2
>   - [X] go-github-com-tdewolff-test
>   - [X] go-github-com-tdewolff-minify-v2
>
> - added to golang-xyz.scm [2/2]
>   - [X] go-github-com-djherbis-atime
>   - [X] go-github-com-matryer-try
>
> And the minify looks like this with inherit and modification:
>
> --8<---------------cut here---------------start------------->8---
> (define-public minify
>   (package
>     (inherit go-github-com-tdewolff-minify-v2)
>     (name "minify")
>     (arguments
>      (substitute-keyword-arguments
>          (package-arguments go-github-com-tdewolff-minify-v2)
>        ((#:install-source? _ #t) #f)
>        ((#:import-path _ "github.com/tdewolff/minify/v2")
>         "github.com/tdewolff/minify/cmd/minify")))

I think there's no need to supply a default value to #:import-path
since all Go packages should have it in their arguments list.

>     (inputs
>      (list go-github-com-djherbis-atime
>            go-github-com-dustin-go-humanize
>            go-github-com-fsnotify-fsnotify
>            go-github-com-matryer-try
>            go-github-com-spf13-pflag))))
> --8<---------------cut here---------------end--------------->8---

And we can avoid the inherited propagated-inputs.

I have adjusted the definition to the following, does this look good
to you?

--8<---------------cut here---------------start------------->8---
(define-public minify
  (let ((base go-github-com-tdewolff-minify-v2))
    (package
      (inherit base)
      (name "minify")
      (arguments
       (substitute-keyword-arguments (package-arguments base)
         ((#:install-source? _ #t) #f)
         ((#:import-path _) "github.com/tdewolff/minify/cmd/minify")))
      (inputs
       (modify-inputs (package-propagated-inputs base)
         (prepend go-github-com-djherbis-atime
                  go-github-com-dustin-go-humanize
                  go-github-com-fsnotify-fsnotify
                  go-github-com-matryer-try
                  go-github-com-spf13-pflag)))
      (propagated-inputs '()))))
--8<---------------cut here---------------end--------------->8---

Thanks





reply via email to

[Prev in Thread] Current Thread [Next in Thread]