Hi Sharlatan,
On Wed, 31 Jan 2024 07:17:29 +0800,
Sharlatan Hellseher wrote:
Toggle quote (31 lines)
>
> [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.
Toggle quote (8 lines)
> (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?
Toggle snippet (19 lines)
(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 '()))))