* [bug#61946] [PATCH 1/6] gnu: Add go-github-com-djherbis-atime.
2023-03-03 22:55 [bug#61946] [PATCH 0/6] gnu: golang: Add minify Thomas Ieong
@ 2023-03-03 23:01 ` Thomas Ieong
2023-03-03 23:01 ` [bug#61946] [PATCH 2/6] gnu: Add go-github-com-matryer-try Thomas Ieong
` (8 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Thomas Ieong @ 2023-03-03 23:01 UTC (permalink / raw)
To: 61946; +Cc: Thomas Ieong
* gnu/packages/golang.scm (go-github-com-djherbis-atime): New variable.
---
gnu/packages/golang.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 465e0fd4c7..e213ce6cb6 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -40,6 +40,7 @@
;;; Copyright © 2022 ( <paren@disroot.org>
;;; Copyright © 2023 Hilton Chain <hako@ultrarare.space>
;;; Copyright © 2023 Timo Wilken <guix@twilken.net>
+;;; Copyright © 2023 Thomas Ieong <th.ieong@free.fr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -9614,6 +9615,28 @@ (define-public go-github-com-bep-golibsass
"This package provides SCSS compiler support for Go applications.")
(license license:expat)))
+(define-public go-github-com-djherbis-atime
+ (package
+ (name "go-github-com-djherbis-atime")
+ (version "1.1.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/djherbis/atime")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0xsz55zpihd9wyrj6qvm3miqzb6x3mnp5apzs0dx1byndhb8adpq"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/djherbis/atime"))
+ (home-page "https://github.com/djherbis/atime")
+ (synopsis "Access Times for files")
+ (description
+ "Package atime provides a platform-independent way to get atimes for files.")
+ (license license:expat)))
+
(define-public go-github-com-hashicorp-go-syslog
(package
(name "go-github-com-hashicorp-go-syslog")
--
2.39.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#61946] [PATCH 2/6] gnu: Add go-github-com-matryer-try.
2023-03-03 22:55 [bug#61946] [PATCH 0/6] gnu: golang: Add minify Thomas Ieong
2023-03-03 23:01 ` [bug#61946] [PATCH 1/6] gnu: Add go-github-com-djherbis-atime Thomas Ieong
@ 2023-03-03 23:01 ` Thomas Ieong
2023-03-03 23:01 ` [bug#61946] [PATCH 3/6] gnu: Add go-github-com-tdewolff-parse-v2 Thomas Ieong
` (7 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Thomas Ieong @ 2023-03-03 23:01 UTC (permalink / raw)
To: 61946; +Cc: Thomas Ieong
* gnu/packages/golang.scm (go-github-com-matryer-try): New variable.
---
gnu/packages/golang.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index e213ce6cb6..1bd2a51d8d 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -9637,6 +9637,37 @@ (define-public go-github-com-djherbis-atime
"Package atime provides a platform-independent way to get atimes for files.")
(license license:expat)))
+(define-public go-github-com-matryer-try
+ (package
+ (name "go-github-com-matryer-try")
+ (version "1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/matryer/try")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "15f0m5ywihivnvwzcw0mh0sg27aky9rkywvxqszxka9q051qvsmy"))))
+ (build-system go-build-system)
+ (native-inputs (list go-github-com-cheekybits-is))
+ (arguments
+ (list #:import-path "github.com/matryer/try"
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-tests
+ (lambda* (#:key import-path #:allow-other-keys)
+ (substitute* (string-append "src/" import-path
+ "/try_test.go")
+ (("var value string")
+ "")
+ (("value, err = SomeFunction\\(\\)")
+ "_, err = SomeFunction()")))))))
+ (home-page "https://github.com/matryer/try")
+ (synopsis "Simple idiomatic retry package for Go")
+ (description "Package try provides retry functionality.")
+ (license license:expat)))
+
(define-public go-github-com-hashicorp-go-syslog
(package
(name "go-github-com-hashicorp-go-syslog")
--
2.39.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#61946] [PATCH 3/6] gnu: Add go-github-com-tdewolff-parse-v2.
2023-03-03 22:55 [bug#61946] [PATCH 0/6] gnu: golang: Add minify Thomas Ieong
2023-03-03 23:01 ` [bug#61946] [PATCH 1/6] gnu: Add go-github-com-djherbis-atime Thomas Ieong
2023-03-03 23:01 ` [bug#61946] [PATCH 2/6] gnu: Add go-github-com-matryer-try Thomas Ieong
@ 2023-03-03 23:01 ` Thomas Ieong
2023-03-03 23:01 ` [bug#61946] [PATCH 4/6] gnu: Add go-github-com-tdewolff-test Thomas Ieong
` (6 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Thomas Ieong @ 2023-03-03 23:01 UTC (permalink / raw)
To: 61946; +Cc: Thomas Ieong
* gnu/packages/golang.scm (go-github-com-tdewolff-parse-v2): New variable.
---
gnu/packages/golang.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 1bd2a51d8d..a331331546 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -9668,6 +9668,30 @@ (define-public go-github-com-matryer-try
(description "Package try provides retry functionality.")
(license license:expat)))
+(define-public go-github-com-tdewolff-parse-v2
+ (package
+ (name "go-github-com-tdewolff-parse-v2")
+ (version "2.6.5")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/tdewolff/parse")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0wmyylml2b1fy735qfpwavjnhfn2ihjgna2yab433mg1ikgl6wxl"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/tdewolff/parse/v2"))
+ (propagated-inputs `(("go-github-com-tdewolff-test" ,go-github-com-tdewolff-test)))
+ (home-page "https://github.com/tdewolff/parse")
+ (synopsis "Go parsers for web formats")
+ (description
+ "Package parse contains a collection of parsers for various formats in its
+subpackages.")
+ (license license:expat)))
+
(define-public go-github-com-hashicorp-go-syslog
(package
(name "go-github-com-hashicorp-go-syslog")
--
2.39.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#61946] [PATCH 4/6] gnu: Add go-github-com-tdewolff-test.
2023-03-03 22:55 [bug#61946] [PATCH 0/6] gnu: golang: Add minify Thomas Ieong
` (2 preceding siblings ...)
2023-03-03 23:01 ` [bug#61946] [PATCH 3/6] gnu: Add go-github-com-tdewolff-parse-v2 Thomas Ieong
@ 2023-03-03 23:01 ` Thomas Ieong
2023-03-03 23:01 ` [bug#61946] [PATCH 5/6] gnu: Add go-github-com-tdewolff-minify-v2 Thomas Ieong
` (5 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Thomas Ieong @ 2023-03-03 23:01 UTC (permalink / raw)
To: 61946; +Cc: Thomas Ieong
* gnu/packages/golang.scm (go-github-com-tdewolff-test): New variable.
---
gnu/packages/golang.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index a331331546..c4426d2a4f 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -9692,6 +9692,30 @@ (define-public go-github-com-tdewolff-parse-v2
subpackages.")
(license license:expat)))
+(define-public go-github-com-tdewolff-test
+ (package
+ (name "go-github-com-tdewolff-test")
+ (version "1.0.7")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/tdewolff/test")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0k1yk2y2mryps0klsbcdxvn7acaxqxkl9mdi2cm6zgl29n3l5gi0"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/tdewolff/test"))
+ (home-page "https://github.com/tdewolff/test")
+ (synopsis "Go test helper functions")
+ (description
+ "Test is a helper package written in @@url{http://golang.org/,Go}. It implements
+a few functions that are useful for io testing, such as readers and writers that
+fail after N consecutive reads/writes.")
+ (license license:expat)))
+
(define-public go-github-com-hashicorp-go-syslog
(package
(name "go-github-com-hashicorp-go-syslog")
--
2.39.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#61946] [PATCH 5/6] gnu: Add go-github-com-tdewolff-minify-v2.
2023-03-03 22:55 [bug#61946] [PATCH 0/6] gnu: golang: Add minify Thomas Ieong
` (3 preceding siblings ...)
2023-03-03 23:01 ` [bug#61946] [PATCH 4/6] gnu: Add go-github-com-tdewolff-test Thomas Ieong
@ 2023-03-03 23:01 ` Thomas Ieong
2023-03-03 23:01 ` [bug#61946] [PATCH 6/6] gnu: Add minify Thomas Ieong
` (4 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Thomas Ieong @ 2023-03-03 23:01 UTC (permalink / raw)
To: 61946; +Cc: Thomas Ieong
* gnu/packages/golang.scm (go-github-com-tdewolff-minify-v2): New variable.
---
gnu/packages/golang.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index c4426d2a4f..de5c0847f6 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -9716,6 +9716,37 @@ (define-public go-github-com-tdewolff-test
fail after N consecutive reads/writes.")
(license license:expat)))
+(define-public go-github-com-tdewolff-minify-v2
+ (package
+ (name "go-github-com-tdewolff-minify-v2")
+ (version "2.12.4")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/tdewolff/minify")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1bbygm8x68xxgqgjzqfwak06212lalsz4aq4dg9z5yjq1c3hp3ji"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/tdewolff/minify/v2"))
+ (propagated-inputs (list go-github-com-tdewolff-test
+ go-github-com-tdewolff-parse-v2
+ go-github-com-spf13-pflag
+ go-github-com-matryer-try
+ go-github-com-fsnotify-fsnotify
+ go-github-com-dustin-go-humanize
+ go-github-com-djherbis-atime
+ go-github-com-cheekybits-is))
+ (home-page "https://github.com/tdewolff/minify")
+ (synopsis "Go minifiers for web formats")
+ (description
+ "Package minify relates MIME type to minifiers. Several minifiers are provided
+in the subpackages.")
+ (license license:expat)))
+
(define-public go-github-com-hashicorp-go-syslog
(package
(name "go-github-com-hashicorp-go-syslog")
--
2.39.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#61946] [PATCH 6/6] gnu: Add minify.
2023-03-03 22:55 [bug#61946] [PATCH 0/6] gnu: golang: Add minify Thomas Ieong
` (4 preceding siblings ...)
2023-03-03 23:01 ` [bug#61946] [PATCH 5/6] gnu: Add go-github-com-tdewolff-minify-v2 Thomas Ieong
@ 2023-03-03 23:01 ` Thomas Ieong
2023-03-04 21:30 ` [bug#61946] Go generated files Thomas Ieong
` (3 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Thomas Ieong @ 2023-03-03 23:01 UTC (permalink / raw)
To: 61946; +Cc: Thomas Ieong
* gnu/packages/golang.scm (minify): New variable.
---
gnu/packages/golang.scm | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index de5c0847f6..85c3d4e893 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -9747,6 +9747,16 @@ (define-public go-github-com-tdewolff-minify-v2
in the subpackages.")
(license license:expat)))
+(define-public minify
+ (package
+ (inherit go-github-com-tdewolff-minify-v2)
+ (name "minify")
+ (arguments
+ `(#:import-path "github.com/tdewolff/minify/cmd/minify"
+ #:unpack-path "github.com/tdewolff/minify"
+ #:install-source? #f))))
+
+
(define-public go-github-com-hashicorp-go-syslog
(package
(name "go-github-com-hashicorp-go-syslog")
--
2.39.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#61946] Go generated files
2023-03-03 22:55 [bug#61946] [PATCH 0/6] gnu: golang: Add minify Thomas Ieong
` (5 preceding siblings ...)
2023-03-03 23:01 ` [bug#61946] [PATCH 6/6] gnu: Add minify Thomas Ieong
@ 2023-03-04 21:30 ` Thomas Ieong
2023-08-10 12:12 ` Hilton Chain via Guix-patches via
` (2 subsequent siblings)
9 siblings, 0 replies; 12+ messages in thread
From: Thomas Ieong @ 2023-03-04 21:30 UTC (permalink / raw)
To: 61946
Hi,
I forgot to check for generated files in the go packages.
I did just that and there is indeed one file hash.go that is generated
in the parse and minify package.
Taking care of this and resending later.
--
Thomas Ieong
^ permalink raw reply [flat|nested] 12+ messages in thread
* [bug#61946] Go generated files
2023-03-03 22:55 [bug#61946] [PATCH 0/6] gnu: golang: Add minify Thomas Ieong
` (6 preceding siblings ...)
2023-03-04 21:30 ` [bug#61946] Go generated files Thomas Ieong
@ 2023-08-10 12:12 ` Hilton Chain via Guix-patches via
2024-01-30 23:17 ` bug#61946: [PATCH 0/6] gnu: golang: Add minify Sharlatan Hellseher
2024-02-01 20:54 ` Sharlatan Hellseher
9 siblings, 0 replies; 12+ messages in thread
From: Hilton Chain via Guix-patches via @ 2023-08-10 12:12 UTC (permalink / raw)
To: Thomas Ieong; +Cc: 61946
Hi Thomas,
> I forgot to check for generated files in the go packages.
> I did just that and there is indeed one file hash.go that is generated
> in the parse and minify package.
>
> Taking care of this and resending later.
go-github-com-tdewolff-minify-v2 has been available in Guix for a
while (but not the minify command and its dependency). I have sent a
patchset [1] to generate hash.go at build time. Can you update the
series to base on it and current Guix?
And I think dependencies not added to go-github-com-tdewolff-minify-v2
are only required by minify command, so there's no need to touch
definition of the former, inherit and modify is sufficient. What do
you think?
Thanks
[1]: <https://issues.guix.gnu.org/65204>
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#61946: [PATCH 0/6] gnu: golang: Add minify
2023-03-03 22:55 [bug#61946] [PATCH 0/6] gnu: golang: Add minify Thomas Ieong
` (7 preceding siblings ...)
2023-08-10 12:12 ` Hilton Chain via Guix-patches via
@ 2024-01-30 23:17 ` Sharlatan Hellseher
2024-02-01 3:10 ` [bug#61946] " Hilton Chain via Guix-patches via
2024-02-01 20:54 ` Sharlatan Hellseher
9 siblings, 1 reply; 12+ messages in thread
From: Sharlatan Hellseher @ 2024-01-30 23:17 UTC (permalink / raw)
To: 61946-done; +Cc: Ricardo Wurmus, Maxim Cournoyer
[-- Attachment #1: Type: text/plain, Size: 1398 bytes --]
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")))
(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---
Maxim or Ricardo,
Pinging you here as following, I've built it few times locally and
everything passed just fine, for some reason CI feel bad.
https://ci.guix.gnu.org/eval/1086875
Thanks,
Oleg
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* [bug#61946] [PATCH 0/6] gnu: golang: Add minify
2024-01-30 23:17 ` bug#61946: [PATCH 0/6] gnu: golang: Add minify Sharlatan Hellseher
@ 2024-02-01 3:10 ` Hilton Chain via Guix-patches via
0 siblings, 0 replies; 12+ messages in thread
From: Hilton Chain via Guix-patches via @ 2024-02-01 3:10 UTC (permalink / raw)
To: Sharlatan Hellseher; +Cc: 61946
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* [bug#61946] [PATCH 0/6] gnu: golang: Add minify
2023-03-03 22:55 [bug#61946] [PATCH 0/6] gnu: golang: Add minify Thomas Ieong
` (8 preceding siblings ...)
2024-01-30 23:17 ` bug#61946: [PATCH 0/6] gnu: golang: Add minify Sharlatan Hellseher
@ 2024-02-01 20:54 ` Sharlatan Hellseher
9 siblings, 0 replies; 12+ messages in thread
From: Sharlatan Hellseher @ 2024-02-01 20:54 UTC (permalink / raw)
To: 61946-done; +Cc: hako
[-- Attachment #1: Type: text/plain, Size: 468 bytes --]
Hi Hilton,
Base on suggestions from <https://issues.guix.gnu.org/68835> I've moved
minifry into golang-web and renamed the package with manner proposed in
<https://issues.guix.gnu.org/68763>.
I image there would be a large verity of packages with name 'minify' in
the future :-).
There is alsoy Python binding we may pack as well
<https://pypi.org/project/tdewolff-minify/>
Pushed to go-minify as df65af45b5f2cc76ce813ca91fab9054fd807bba to master.
Thanks,
Oleg
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread