* [bug#65204] [PATCH 0/6] gnu: Add go-github-com-tdewolff-hasher.
@ 2023-08-10 11:40 Hilton Chain via Guix-patches via
2023-08-10 11:43 ` [bug#65204] [PATCH 1/6] gnu: Add go-github-com-dgryski-go-metro Hilton Chain via Guix-patches via
` (6 more replies)
0 siblings, 7 replies; 10+ messages in thread
From: Hilton Chain via Guix-patches via @ 2023-08-10 11:40 UTC (permalink / raw)
To: 65204; +Cc: Hilton Chain
Hello Guix!
I learned about there're pre-generated files in
go-github-com-tdewolff-parse-v2 and go-github-com-tdewolff-minify-v2 when
looking through #61946.
So this patchset adds go-github-com-tdewolff-hasher, which is the generator,
and uses it to generate relevant files for those two packages.
Thanks
Hilton Chain (6):
gnu: Add go-github-com-dgryski-go-metro.
gnu: Add go-github-com-dgryski-go-mph.
gnu: Add go-github-com-cespare-mph.
gnu: Add go-github-com-tdewolff-hasher.
gnu: go-github-com-tdewolff-parse-v2: Regenerate hash.
gnu: go-github-com-tdewolff-minify-v2: Regenerate hash.
gnu/packages/golang.scm | 131 ++++++++++++++++++++++++++++++++++++++--
1 file changed, 127 insertions(+), 4 deletions(-)
base-commit: 90e34d25d5e7c14b7f3293a78f3cdad676c0d035
--
2.41.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [bug#65204] [PATCH 1/6] gnu: Add go-github-com-dgryski-go-metro.
2023-08-10 11:40 [bug#65204] [PATCH 0/6] gnu: Add go-github-com-tdewolff-hasher Hilton Chain via Guix-patches via
@ 2023-08-10 11:43 ` Hilton Chain via Guix-patches via
2023-08-10 11:43 ` [bug#65204] [PATCH 2/6] gnu: Add go-github-com-dgryski-go-mph Hilton Chain via Guix-patches via
` (5 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Hilton Chain via Guix-patches via @ 2023-08-10 11:43 UTC (permalink / raw)
To: 65204; +Cc: Hilton Chain
* gnu/packages/golang.scm (go-github-com-dgryski-go-metro): 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 ea6aadbe80..88c77db5f8 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -5246,6 +5246,30 @@ (define-public go-github-com-ayufan-golang-kardianos-service
SysVinit, and more.")
(license license:zlib))))
+(define-public go-github-com-dgryski-go-metro
+ (package
+ (name "go-github-com-dgryski-go-metro")
+ (version "0.0.0-20211217172704-adc40b04c140")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dgryski/go-metro")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "16y5vc5qf7aipi8basqza8l939hlmp7wqsv4y6gsqac3sp9ziqyj"))))
+ (build-system go-build-system)
+ (arguments
+ (list #:import-path "github.com/dgryski/go-metro"))
+ (home-page "https://github.com/dgryski/go-metro")
+ (synopsis "Go translation of MetroHash")
+ (description
+ "This package provides a Go translation of the
+@url{https://github.com/jandrewrogers/MetroHash, reference C++ code for
+MetroHash}, a high quality, high performance hash algorithm.")
+ (license license:expat)))
+
(define-public go-github-com-docker-distribution
(let ((commit "325b0804fef3a66309d962357aac3c2ce3f4d329")
(revision "0"))
--
2.41.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [bug#65204] [PATCH 2/6] gnu: Add go-github-com-dgryski-go-mph.
2023-08-10 11:40 [bug#65204] [PATCH 0/6] gnu: Add go-github-com-tdewolff-hasher Hilton Chain via Guix-patches via
2023-08-10 11:43 ` [bug#65204] [PATCH 1/6] gnu: Add go-github-com-dgryski-go-metro Hilton Chain via Guix-patches via
@ 2023-08-10 11:43 ` Hilton Chain via Guix-patches via
2023-08-10 11:43 ` [bug#65204] [PATCH 3/6] gnu: Add go-github-com-cespare-mph Hilton Chain via Guix-patches via
` (4 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Hilton Chain via Guix-patches via @ 2023-08-10 11:43 UTC (permalink / raw)
To: 65204; +Cc: Hilton Chain
* gnu/packages/golang.scm (go-github-com-dgryski-go-mph): 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 88c77db5f8..016695239e 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -5270,6 +5270,30 @@ (define-public go-github-com-dgryski-go-metro
MetroHash}, a high quality, high performance hash algorithm.")
(license license:expat)))
+(define-public go-github-com-dgryski-go-mph
+ (package
+ (name "go-github-com-dgryski-go-mph")
+ (version "0.0.0-20211217222804-81a8625fb7ed")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dgryski/go-mph")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "10q8l4jdzqf54bnnxka2jk6qzayri3ijv51knn1n0iimfric8w9g"))))
+ (build-system go-build-system)
+ (arguments
+ (list #:import-path "github.com/dgryski/go-mph"))
+ (propagated-inputs
+ (list go-github-com-dgryski-go-metro))
+ (home-page "https://github.com/dgryski/go-mph")
+ (synopsis "Go minimal perfect hash function")
+ (description
+ "This package implements a hash/displace minimal perfect hash function.")
+ (license license:expat)))
+
(define-public go-github-com-docker-distribution
(let ((commit "325b0804fef3a66309d962357aac3c2ce3f4d329")
(revision "0"))
--
2.41.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [bug#65204] [PATCH 3/6] gnu: Add go-github-com-cespare-mph.
2023-08-10 11:40 [bug#65204] [PATCH 0/6] gnu: Add go-github-com-tdewolff-hasher Hilton Chain via Guix-patches via
2023-08-10 11:43 ` [bug#65204] [PATCH 1/6] gnu: Add go-github-com-dgryski-go-metro Hilton Chain via Guix-patches via
2023-08-10 11:43 ` [bug#65204] [PATCH 2/6] gnu: Add go-github-com-dgryski-go-mph Hilton Chain via Guix-patches via
@ 2023-08-10 11:43 ` Hilton Chain via Guix-patches via
2023-08-10 11:43 ` [bug#65204] [PATCH 4/6] gnu: Add go-github-com-tdewolff-hasher Hilton Chain via Guix-patches via
` (3 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Hilton Chain via Guix-patches via @ 2023-08-10 11:43 UTC (permalink / raw)
To: 65204; +Cc: Hilton Chain
* gnu/packages/golang.scm (go-github-com-cespare-mph): 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 016695239e..b84e4c7ba7 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7324,6 +7324,29 @@ (define-public go-github-com-cention-sany-utf7
encoding in Go.")
(license license:bsd-3)))
+(define-public go-github-com-cespare-mph
+ (package
+ (name "go-github-com-cespare-mph")
+ (version "0.1.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cespare/mph")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0mvd6bkvf3i3555kqkkr3k9jd4c25scjq4xad35sxpny8f72nbg1"))))
+ (build-system go-build-system)
+ (arguments
+ (list #:import-path "github.com/cespare/mph"))
+ (home-page "https://github.com/cespare/mph")
+ (synopsis "Minimal perfect hashing in Go")
+ (description
+ "@code{mph} is a Go package that implements a minimal perfect hash table
+over strings.")
+ (license license:expat)))
+
(define-public go-github-com-gdamore-tcell
(let ((commit "aaadc574a6ed8dc3abe56036ca130dcee1ee6b6e")
(version "1.1.2")
--
2.41.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [bug#65204] [PATCH 4/6] gnu: Add go-github-com-tdewolff-hasher.
2023-08-10 11:40 [bug#65204] [PATCH 0/6] gnu: Add go-github-com-tdewolff-hasher Hilton Chain via Guix-patches via
` (2 preceding siblings ...)
2023-08-10 11:43 ` [bug#65204] [PATCH 3/6] gnu: Add go-github-com-cespare-mph Hilton Chain via Guix-patches via
@ 2023-08-10 11:43 ` Hilton Chain via Guix-patches via
2023-08-10 11:43 ` [bug#65204] [PATCH 5/6] gnu: go-github-com-tdewolff-parse-v2: Regenerate hash Hilton Chain via Guix-patches via
` (2 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Hilton Chain via Guix-patches via @ 2023-08-10 11:43 UTC (permalink / raw)
To: 65204; +Cc: Hilton Chain
* gnu/packages/golang.scm (go-github-com-tdewolff-hasher): New variable.
---
gnu/packages/golang.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index b84e4c7ba7..21562a135f 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -3403,6 +3403,32 @@ (define-public go-github-com-saracen-walker
(description "The @code{walker} function is a faster, parallel version, of
@code{filepath.Walk}")))
+(define-public go-github-com-tdewolff-hasher
+ (package
+ (name "go-github-com-tdewolff-hasher")
+ (version "0.0.0-20210521220142-bc97f602bca2")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/tdewolff/hasher")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "12dmxpmdy2z7c2z7qv2mv2aq4hyvjncb6fzr0ymg3y5bfjvl4dcw"))))
+ (build-system go-build-system)
+ (arguments
+ (list #:import-path "github.com/tdewolff/hasher"))
+ (native-inputs
+ (list go-github-com-cespare-mph
+ go-github-com-dgryski-go-mph))
+ (home-page "https://github.com/tdewolff/hasher")
+ (synopsis "Go known-keys fast-lookup map generator")
+ (description
+ "Hasher is a tool to automate the creation of methods and tables for a
+@code{string} to @code{uint32} mapper.")
+ (license license:bsd-3)))
+
(define-public go-github-com-tdewolff-minify-v2
(package
(name "go-github-com-tdewolff-minify-v2")
--
2.41.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [bug#65204] [PATCH 5/6] gnu: go-github-com-tdewolff-parse-v2: Regenerate hash.
2023-08-10 11:40 [bug#65204] [PATCH 0/6] gnu: Add go-github-com-tdewolff-hasher Hilton Chain via Guix-patches via
` (3 preceding siblings ...)
2023-08-10 11:43 ` [bug#65204] [PATCH 4/6] gnu: Add go-github-com-tdewolff-hasher Hilton Chain via Guix-patches via
@ 2023-08-10 11:43 ` Hilton Chain via Guix-patches via
2023-08-21 14:03 ` [bug#65204] [PATCH 0/6] gnu: Add go-github-com-tdewolff-hasher Ludovic Courtès
2023-08-10 11:43 ` [bug#65204] [PATCH 6/6] gnu: go-github-com-tdewolff-minify-v2: Regenerate hash Hilton Chain via Guix-patches via
2023-09-06 5:28 ` bug#65204: [PATCH 0/6] gnu: Add go-github-com-tdewolff-hasher Maxim Cournoyer
6 siblings, 1 reply; 10+ messages in thread
From: Hilton Chain via Guix-patches via @ 2023-08-10 11:43 UTC (permalink / raw)
To: 65204; +Cc: Hilton Chain
* gnu/packages/golang.scm (go-github-com-tdewolff-parse-v2)[#:phases]: Add
phase 'regenerate-hash.
[native-inputs]: Add go-github-com-tdewolff-hasher.
---
gnu/packages/golang.scm | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 21562a135f..4360fccc0a 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -3471,9 +3471,22 @@ (define-public go-github-com-tdewolff-parse-v2
"1dqki9ima079k9a3l72igmx5dml8qsl9z8rzw8a433f4gjhlv320"))))
(build-system go-build-system)
(arguments
- (list #:import-path "github.com/tdewolff/parse/v2"))
+ (list #:import-path "github.com/tdewolff/parse/v2"
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'regenerate-hash
+ (lambda* (#:key import-path #:allow-other-keys)
+ (for-each
+ (lambda (dir)
+ (with-directory-excursion
+ (format #f "src/~a/~a" import-path dir)
+ (make-file-writable "hash.go")
+ (format #t "Generating `hash.go' for ~a...~%" dir)
+ (invoke "go" "generate")))
+ '("css" "html")))))))
(native-inputs
- (list go-github-com-tdewolff-test))
+ (list go-github-com-tdewolff-hasher
+ go-github-com-tdewolff-test))
(home-page "https://github.com/tdewolff/parse")
(synopsis "Go parsers for web formats")
(description
--
2.41.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [bug#65204] [PATCH 6/6] gnu: go-github-com-tdewolff-minify-v2: Regenerate hash.
2023-08-10 11:40 [bug#65204] [PATCH 0/6] gnu: Add go-github-com-tdewolff-hasher Hilton Chain via Guix-patches via
` (4 preceding siblings ...)
2023-08-10 11:43 ` [bug#65204] [PATCH 5/6] gnu: go-github-com-tdewolff-parse-v2: Regenerate hash Hilton Chain via Guix-patches via
@ 2023-08-10 11:43 ` Hilton Chain via Guix-patches via
2023-09-06 5:28 ` bug#65204: [PATCH 0/6] gnu: Add go-github-com-tdewolff-hasher Maxim Cournoyer
6 siblings, 0 replies; 10+ messages in thread
From: Hilton Chain via Guix-patches via @ 2023-08-10 11:43 UTC (permalink / raw)
To: 65204; +Cc: Hilton Chain
* gnu/packages/golang.scm (go-github-com-tdewolff-minify-v2)[#:phases]: Add
phase 'regenerate-hash.
[native-inputs]: Add go-github-com-tdewolff-hasher.
---
gnu/packages/golang.scm | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 4360fccc0a..0cac1e0149 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -3444,11 +3444,24 @@ (define-public go-github-com-tdewolff-minify-v2
"0h006wpfkl0ls0skqxblwcanrhmphgq5q0ii26l2ayh7s99cgmy3"))))
(build-system go-build-system)
(arguments
- (list #:import-path "github.com/tdewolff/minify/v2"))
+ (list #:import-path "github.com/tdewolff/minify/v2"
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'regenerate-hash
+ (lambda* (#:key import-path #:allow-other-keys)
+ (for-each
+ (lambda (dir)
+ (with-directory-excursion
+ (format #f "src/~a/~a" import-path dir)
+ (make-file-writable "hash.go")
+ (format #t "Generating `hash.go' for ~a...~%" dir)
+ (invoke "go" "generate")))
+ '("css" "html" "svg")))))))
(propagated-inputs
(list go-github-com-tdewolff-parse-v2))
(native-inputs
- (list go-github-com-tdewolff-test))
+ (list go-github-com-tdewolff-hasher
+ go-github-com-tdewolff-test))
(home-page "https://go.tacodewolff.nl/minify")
(synopsis "Go minifiers for web formats")
(description
--
2.41.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [bug#65204] [PATCH 0/6] gnu: Add go-github-com-tdewolff-hasher.
2023-08-10 11:43 ` [bug#65204] [PATCH 5/6] gnu: go-github-com-tdewolff-parse-v2: Regenerate hash Hilton Chain via Guix-patches via
@ 2023-08-21 14:03 ` Ludovic Courtès
2023-08-21 15:20 ` Hilton Chain via Guix-patches via
0 siblings, 1 reply; 10+ messages in thread
From: Ludovic Courtès @ 2023-08-21 14:03 UTC (permalink / raw)
To: Hilton Chain; +Cc: 65204
Hi,
Hilton Chain <hako@ultrarare.space> skribis:
> * gnu/packages/golang.scm (go-github-com-tdewolff-parse-v2)[#:phases]: Add
> phase 'regenerate-hash.
> [native-inputs]: Add go-github-com-tdewolff-hasher.
[...]
> + (list #:import-path "github.com/tdewolff/parse/v2"
> + #:phases
> + #~(modify-phases %standard-phases
> + (add-after 'unpack 'regenerate-hash
> + (lambda* (#:key import-path #:allow-other-keys)
> + (for-each
> + (lambda (dir)
> + (with-directory-excursion
> + (format #f "src/~a/~a" import-path dir)
> + (make-file-writable "hash.go")
> + (format #t "Generating `hash.go' for ~a...~%" dir)
> + (invoke "go" "generate")))
Maybe you can remove ‘hash.go’ in a snippet, for good measure, and add a
comment clarifying that it’s a generated file.
Otherwise the patch series LGTM!
Ludo’.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [bug#65204] [PATCH 0/6] gnu: Add go-github-com-tdewolff-hasher.
2023-08-21 14:03 ` [bug#65204] [PATCH 0/6] gnu: Add go-github-com-tdewolff-hasher Ludovic Courtès
@ 2023-08-21 15:20 ` Hilton Chain via Guix-patches via
0 siblings, 0 replies; 10+ messages in thread
From: Hilton Chain via Guix-patches via @ 2023-08-21 15:20 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 65204
Hi Ludo,
On Mon, 21 Aug 2023 22:03:27 +0800,
Ludovic Courtès wrote:
>
> > * gnu/packages/golang.scm (go-github-com-tdewolff-parse-v2)[#:phases]: Add
> > phase 'regenerate-hash.
> > [native-inputs]: Add go-github-com-tdewolff-hasher.
>
> [...]
>
> > + (list #:import-path "github.com/tdewolff/parse/v2"
> > + #:phases
> > + #~(modify-phases %standard-phases
> > + (add-after 'unpack 'regenerate-hash
> > + (lambda* (#:key import-path #:allow-other-keys)
> > + (for-each
> > + (lambda (dir)
> > + (with-directory-excursion
> > + (format #f "src/~a/~a" import-path dir)
> > + (make-file-writable "hash.go")
> > + (format #t "Generating `hash.go' for ~a...~%" dir)
> > + (invoke "go" "generate")))
>
> Maybe you can remove ‘hash.go’ in a snippet, for good measure, and add a
> comment clarifying that it’s a generated file.
>
> Otherwise the patch series LGTM!
Source data to generate the hash is also written in `hash.go', so it's
not possible to remove it.
Thanks
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#65204: [PATCH 0/6] gnu: Add go-github-com-tdewolff-hasher.
2023-08-10 11:40 [bug#65204] [PATCH 0/6] gnu: Add go-github-com-tdewolff-hasher Hilton Chain via Guix-patches via
` (5 preceding siblings ...)
2023-08-10 11:43 ` [bug#65204] [PATCH 6/6] gnu: go-github-com-tdewolff-minify-v2: Regenerate hash Hilton Chain via Guix-patches via
@ 2023-09-06 5:28 ` Maxim Cournoyer
6 siblings, 0 replies; 10+ messages in thread
From: Maxim Cournoyer @ 2023-09-06 5:28 UTC (permalink / raw)
To: Hilton Chain; +Cc: 65204-done
Hi,
Hilton Chain <hako@ultrarare.space> writes:
> Hello Guix!
>
> I learned about there're pre-generated files in
> go-github-com-tdewolff-parse-v2 and go-github-com-tdewolff-minify-v2 when
> looking through #61946.
>
> So this patchset adds go-github-com-tdewolff-hasher, which is the generator,
> and uses it to generate relevant files for those two packages.
Great! Installed.
--
Thanks,
Maxim
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-09-06 5:30 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-10 11:40 [bug#65204] [PATCH 0/6] gnu: Add go-github-com-tdewolff-hasher Hilton Chain via Guix-patches via
2023-08-10 11:43 ` [bug#65204] [PATCH 1/6] gnu: Add go-github-com-dgryski-go-metro Hilton Chain via Guix-patches via
2023-08-10 11:43 ` [bug#65204] [PATCH 2/6] gnu: Add go-github-com-dgryski-go-mph Hilton Chain via Guix-patches via
2023-08-10 11:43 ` [bug#65204] [PATCH 3/6] gnu: Add go-github-com-cespare-mph Hilton Chain via Guix-patches via
2023-08-10 11:43 ` [bug#65204] [PATCH 4/6] gnu: Add go-github-com-tdewolff-hasher Hilton Chain via Guix-patches via
2023-08-10 11:43 ` [bug#65204] [PATCH 5/6] gnu: go-github-com-tdewolff-parse-v2: Regenerate hash Hilton Chain via Guix-patches via
2023-08-21 14:03 ` [bug#65204] [PATCH 0/6] gnu: Add go-github-com-tdewolff-hasher Ludovic Courtès
2023-08-21 15:20 ` Hilton Chain via Guix-patches via
2023-08-10 11:43 ` [bug#65204] [PATCH 6/6] gnu: go-github-com-tdewolff-minify-v2: Regenerate hash Hilton Chain via Guix-patches via
2023-09-06 5:28 ` bug#65204: [PATCH 0/6] gnu: Add go-github-com-tdewolff-hasher Maxim Cournoyer
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.