[PATCH 0/5] Add some Chicken eggs and fix egg importer

  • Done
  • quality assurance status badge
Details
2 participants
  • Hartmut Goebel
  • Ludovic Courtès
Owner
unassigned
Submitted by
Hartmut Goebel
Severity
normal
H
H
Hartmut Goebel wrote on 29 Jun 2022 09:26
(address . guix-patches@gnu.org)
cover.1656487185.git.h.goebel@crazy-compilers.com
When testing the egg updater, I discovered
that there was not a single package using the egg updater.
So this adds some (random) Chicken eggs for testing the egg updater.
And, well, there actually was a bug in the egg updater.

Note for reviewers: I already ran 'guix lint' on the packages.

Hartmut Goebel (5):
gnu: Add chicken-crypto-tools.
gnu: Add chicken-srfi-13.
gnu: Add chicken-srfi-37.
gnu: Add chicken-args.
import: egg: Fix updater.

gnu/packages/chicken.scm | 90 ++++++++++++++++++++++++++++++++++++++++
guix/import/egg.scm | 9 +---
2 files changed, 92 insertions(+), 7 deletions(-)

--
2.30.4
H
H
Hartmut Goebel wrote on 29 Jun 2022 09:27
[PATCH 1/5] gnu: Add chicken-crypto-tools.
(address . 56295@debbugs.gnu.org)
a512ddaf27362eaa5cd958997e11588668810551.1656487185.git.h.goebel@crazy-compilers.com
* gnu/packages/chicken.scm (chicken-crypto-tools): New variable.
---
gnu/packages/chicken.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)

Toggle diff (41 lines)
diff --git a/gnu/packages/chicken.scm b/gnu/packages/chicken.scm
index d611c1762e..c4e0a9c693 100644
--- a/gnu/packages/chicken.scm
+++ b/gnu/packages/chicken.scm
@@ -278,3 +278,34 @@ with integers.")
"This package provides a simple testing utility for CHICKEN Scheme.")
(license license:bsd-3)))
+(define-public chicken-crypto-tools
+ (package
+ (name "chicken-crypto-tools")
+ (version "1.4")
+ (source (origin
+ (method url-fetch)
+ (uri (egg-uri "crypto-tools" version))
+ (sha256
+ (base32
+ "0ajf0qfnhp99f4x1dll2fhlxrsxamgrrwyksc7rrym77xmv8f1pd"))))
+ (build-system chicken-build-system)
+ (arguments '(#:egg-name "crypto-tools"))
+ (home-page "https://wiki.call-cc.org/egg/crypto-tools")
+ (synopsis "Useful cryptographic primitives")
+ (description "The crypto-tools egg implements useful cryptographic
+primitives. More specifically, provided are:
+
+@itemize
+@item binary blobs
+@itemize
+@item marshallers to and from hex strings
+@item blob xor
+@item blob padding using either PKCS#5 or ISO7816-4
+@end itemize
+@item Block cipher modes of operation
+@itemize
+@item CBC with or without incorporated encrypted IV in the ciphertext
+@item CTR with or without incorporated IV in the ciphertext
+@end itemize
+@end itemize")
+ (license license:bsd-3)))
--
2.30.4
H
H
Hartmut Goebel wrote on 29 Jun 2022 09:27
[PATCH 3/5] gnu: Add chicken-srfi-37.
(address . 56295@debbugs.gnu.org)
456f97ae1ebdfaf83f29f4f9cc46c52e18ed6909.1656487185.git.h.goebel@crazy-compilers.com
* gnu/packages/chicken.scm (chicken-srfi-37): New variable.
---
gnu/packages/chicken.scm | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

Toggle diff (32 lines)
diff --git a/gnu/packages/chicken.scm b/gnu/packages/chicken.scm
index b87b8118f1..a35ef46f6b 100644
--- a/gnu/packages/chicken.scm
+++ b/gnu/packages/chicken.scm
@@ -156,6 +156,25 @@ a characters and be compared to other character sets")
(license (license:non-copyleft
"http://wiki.call-cc.org/eggref/5/srfi-14#license"))))
+(define-public chicken-srfi-37
+ (package
+ (name "chicken-srfi-37")
+ (version "1.4")
+ (source (origin
+ (method url-fetch)
+ (uri (egg-uri "srfi-37" version))
+ (sha256
+ (base32
+ "10n2qyyv7n4r0m20wyzd8y6s6knc67kdh9i8gp8jgz8b05p7xy8g"))))
+ (build-system chicken-build-system)
+ (arguments '(#:egg-name "srfi-37"))
+ (native-inputs (list chicken-test))
+ (home-page "https://wiki.call-cc.org/egg/srfi-37")
+ (synopsis "SRFI-37 command-line option parsing for Chicken scheme")
+ (description "This package provides SRFI-37, a simple and flexible
+command-line option parsing facility, for Chicken scheme.")
+ (license (license:non-copyleft home-page)))) ;; TODO: refine
+
(define-public chicken-srfi-69
(package
(name "chicken-srfi-69")
--
2.30.4
H
H
Hartmut Goebel wrote on 29 Jun 2022 09:27
[PATCH 2/5] gnu: Add chicken-srfi-13.
(address . 56295@debbugs.gnu.org)
b217d5da8f18497780f9eca06866117bf623bcb5.1656487185.git.h.goebel@crazy-compilers.com
* gnu/packages/chicken.scm (chicken-srfi-13): New variable.
---
gnu/packages/chicken.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/chicken.scm b/gnu/packages/chicken.scm
index c4e0a9c693..b87b8118f1 100644
--- a/gnu/packages/chicken.scm
+++ b/gnu/packages/chicken.scm
@@ -109,6 +109,26 @@ useful list processing procedures for construction, examining, destructuring
and manipulating lists and pairs.")
(license license:bsd-3)))
+(define-public chicken-srfi-13
+ (package
+ (name "chicken-srfi-13")
+ (version "0.3.2")
+ (source (origin
+ (method url-fetch)
+ (uri (egg-uri "srfi-13" version))
+ (sha256
+ (base32
+ "18clbmaampaxivwx9bya9fxnkzqbczhlz0kbs9bfapm77mxkwclc"))))
+ (build-system chicken-build-system)
+ (arguments '(#:egg-name "srfi-13"))
+ (native-inputs (list chicken-test))
+ (propagated-inputs (list chicken-srfi-14))
+ (home-page "https://wiki.call-cc.org/egg/srfi-13")
+ (synopsis "SRFI-13 string library for Chicken scheme")
+ (description "This package provides the SRFI-13 string library for Chicken
+scheme.")
+ (license license:bsd-3)))
+
(define-public chicken-srfi-14
(package
(name "chicken-srfi-14")
--
2.30.4
H
H
Hartmut Goebel wrote on 29 Jun 2022 09:27
[PATCH 5/5] import: egg: Fix updater.
(address . 56295@debbugs.gnu.org)
1d4cc7acf18b3e13e3921f41c44c7c449bc636f2.1656487185.git.h.goebel@crazy-compilers.com
'egg-source-url' did not return the URL, but the quoted expression. This did
break the updater, which expects the URL as a string.

* guix/import/egg.scm(egg-source-url): Remove.
(egg->guix-package)[egg-content]: Use quoted expression directly.
(latest-release): Call egg-uri instead of egg-source-url.
---
guix/import/egg.scm | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)

Toggle diff (36 lines)
diff --git a/guix/import/egg.scm b/guix/import/egg.scm
index 0b88020554..52196583c4 100644
--- a/guix/import/egg.scm
+++ b/guix/import/egg.scm
@@ -85,11 +85,6 @@
(define %eggs-home-page
(make-parameter "https://wiki.call-cc.org/egg"))
-(define (egg-source-url name version)
- "Return the URL to the source tarball for version VERSION of the CHICKEN egg
-NAME."
- `(egg-uri ,name version))
-
(define (egg-name->guix-name name)
"Return the package name for CHICKEN egg NAME."
(string-append package-name-prefix name))
@@ -196,7 +191,7 @@ not work."
(let* ((version* (or (assoc-ref egg-content 'version)
(find-latest-version name)))
(version (if (list? version*) (first version*) version*))
- (source-url (if source #f (egg-source-url name version)))
+ (source-url (if source #f `(egg-uri ,name version)))
(tarball (if source
#f
(with-store store
@@ -342,7 +337,7 @@ not work."
"Return an @code{<upstream-source>} for the latest release of PACKAGE."
(let* ((egg-name (guix-package->egg-name package))
(version (find-latest-version egg-name))
- (source-url (egg-source-url egg-name version)))
+ (source-url (egg-uri egg-name version)))
(upstream-source
(package (package-name package))
(version version)
--
2.30.4
H
H
Hartmut Goebel wrote on 29 Jun 2022 09:27
[PATCH 4/5] gnu: Add chicken-args.
(address . 56295@debbugs.gnu.org)
5d68638bfcf84ac5ec9012ac6d3830e8123570a2.1656487185.git.h.goebel@crazy-compilers.com
* gnu/packages/chicken.scm (chicken-args): New variable.
---
gnu/packages/chicken.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

Toggle diff (30 lines)
diff --git a/gnu/packages/chicken.scm b/gnu/packages/chicken.scm
index a35ef46f6b..baab6b971a 100644
--- a/gnu/packages/chicken.scm
+++ b/gnu/packages/chicken.scm
@@ -348,3 +348,23 @@ primitives. More specifically, provided are:
@end itemize
@end itemize")
(license license:bsd-3)))
+
+(define-public chicken-args
+ (package
+ (name "chicken-args")
+ (version "1.6.2")
+ (source (origin
+ (method url-fetch)
+ (uri (egg-uri "args" version))
+ (sha256
+ (base32
+ "0knkg31d4dq9a8rq9g3ycmj0z6j9l7zp93qa9cnqc8ixd6jsymkm"))))
+ (build-system chicken-build-system)
+ (arguments '(#:egg-name "args"))
+ (propagated-inputs (list chicken-srfi-1 chicken-srfi-13 chicken-srfi-37))
+ (home-page "https://wiki.call-cc.org/egg/args")
+ (synopsis "Command-line argument handling, on top of SRFI 37")
+ (description "This extension provides a wrapper around
+SRFI-37 (args-fold). The main goal is to let the user parse command-line
+arguments without having to write a lot of similar support code every time.")
+ (license license:bsd-3)))
--
2.30.4
L
L
Ludovic Courtès wrote on 12 Jul 2022 23:30
Re: bug#56295: [PATCH 0/5] Add some Chicken eggs and fix egg importer
(name . Hartmut Goebel)(address . h.goebel@crazy-compilers.com)(address . 56295@debbugs.gnu.org)
87o7xuc947.fsf_-_@gnu.org
Hi,

Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:

Toggle quote (2 lines)
> * gnu/packages/chicken.scm (chicken-srfi-37): New variable.

[...]

Toggle quote (6 lines)
> + (synopsis "SRFI-37 command-line option parsing for Chicken scheme")
> + (description "This package provides SRFI-37, a simple and flexible
> +command-line option parsing facility, for Chicken scheme.")
> + (license (license:non-copyleft home-page)))) ;; TODO: refine

It carries the SRFI license, which is non-free (Philip McGrath stumbled
upon a similar issue with Racket¹). So this package cannot be included.

There exist free implementations of SRFI-37 though, such as that of
Guile, so one option would be to come up with a separate egg released
under a free license.

I realize that may be more work than you were expecting, but I expecting
porting this module from Guile (say) to CHICKEN to be within reach.

Thanks,
Ludo’.

L
L
Ludovic Courtès wrote on 12 Jul 2022 23:32
(name . Hartmut Goebel)(address . h.goebel@crazy-compilers.com)(address . 56295@debbugs.gnu.org)
87k08ic90n.fsf_-_@gnu.org
Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:

Toggle quote (7 lines)
> 'egg-source-url' did not return the URL, but the quoted expression. This did
> break the updater, which expects the URL as a string.
>
> * guix/import/egg.scm(egg-source-url): Remove.
> (egg->guix-package)[egg-content]: Use quoted expression directly.
> (latest-release): Call egg-uri instead of egg-source-url.

Make sure “make check TESTS=tests/egg.scm” still passes.

If it does, go for it!

Ludo’.
L
L
Ludovic Courtès wrote on 12 Jul 2022 23:32
(name . Hartmut Goebel)(address . h.goebel@crazy-compilers.com)(address . 56295@debbugs.gnu.org)
87fsj6c8zc.fsf@gnu.org
Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:

Toggle quote (6 lines)
> gnu: Add chicken-crypto-tools.
> gnu: Add chicken-srfi-13.
> gnu: Add chicken-srfi-37.
> gnu: Add chicken-args.
> import: egg: Fix updater.

Apart from ‘chicken-srfi-37’, it LGTM, thanks!

Ludo’.
H
H
Hartmut Goebel wrote on 15 Jul 2022 20:42
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 56295-close@debbugs.gnu.org)
127029e9-7acb-03c9-9e58-0e604d2090d8@crazy-compilers.com
Thanks for the review. tests/egg.scm ist still passing. Removed the
chicken-srfi-37 package and pushed as
ec8bccd9903cbe30bd351768fe310814852b32ff.

--
Regards
Hartmut Goebel

| Hartmut Goebel | h.goebel@crazy-compilers.com |
| www.crazy-compilers.com | compilers which you thought are impossible |
?