(address . guix-patches@gnu.org)
X-Debbugs-CC: ludo@gnu.org
X-Debbugs-CC: iskarian@mgsn.dev
Hi guix,
These three patches allows (guix upstream) to replace the values in the surrounding 'let'
form, if any. It's important for constructs like:
(define-public gnash
(let ((version "0.8.11")
(commit "583ccbc1275c7701dc4843ec12142ff86bb305b4")
(revision "0"))
(package
(name "gnash")
(version (git-version version revision commit))
(source (git-reference
(url "https://example.org")
(commit commit)))
[...])))
such that it can update the version, commit, revision. (Currently only the
version will be updatable, but see https://issues.guix.gnu.org/50072#0
and https://issues.guix.gnu.org/50072#9 for work on making 'commit' updatable).
More details in the patches themselves.
Greetings,
Maxime
From 90c090fbf3da162e94e5467de897aa5cf1eb8c4c Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Mon, 30 Aug 2021 17:03:03 +0200
Subject: [PATCH 2/3] Remove conflicting SRFI-71 imports.
Don't import both (guix packages) and (srfi srfi-71),
as the let and let* bindings of one will replace the ones
of the other.
* guix/import/crate.scm: Don't import (srfi srfi-71).
* guix/import/egg.scm: Likewise.
* guix/import/utils.scm: Likewise.
* guix/scripts/pull.scm: Likewise.
* tests/packages.scm: Likewise.
---
guix/import/crate.scm | 1 -
guix/import/egg.scm | 1 -
guix/import/utils.scm | 1 -
guix/scripts/pull.scm | 1 -
tests/packages.scm | 1 -
5 files changed, 5 deletions(-)
Toggle diff (62 lines)
diff --git a/guix/import/crate.scm b/guix/import/crate.scm
index 287ffd2536..eb2fa1e1c4 100644
--- a/guix/import/crate.scm
+++ b/guix/import/crate.scm
@@ -40,7 +40,6 @@
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-2)
#:use-module (srfi srfi-26)
- #:use-module (srfi srfi-71)
#:export (crate->guix-package
guix-package->crate-name
string->license
diff --git a/guix/import/egg.scm b/guix/import/egg.scm
index 107894ddcf..a7535be8a6 100644
--- a/guix/import/egg.scm
+++ b/guix/import/egg.scm
@@ -21,7 +21,6 @@
#:use-module (ice-9 ftw)
#:use-module (ice-9 match)
#:use-module (srfi srfi-1)
- #:use-module (srfi srfi-71)
#:use-module (gcrypt hash)
#:use-module (guix git)
#:use-module (guix i18n)
diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index d1b8076ddd..e433449d18 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -47,7 +47,6 @@
#:use-module (srfi srfi-9)
#:use-module (srfi srfi-11)
#:use-module (srfi srfi-26)
- #:use-module (srfi srfi-71)
#:export (factorize-uri
flatten
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index fb8ce50fa7..f81df47a0e 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -55,7 +55,6 @@
#:use-module (srfi srfi-34)
#:use-module (srfi srfi-35)
#:use-module (srfi srfi-37)
- #:use-module (srfi srfi-71)
#:use-module (ice-9 match)
#:use-module (ice-9 vlist)
#:use-module (ice-9 format)
diff --git a/tests/packages.scm b/tests/packages.scm
index 50fb3d0718..5ff71b7af1 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -57,7 +57,6 @@
#:use-module (srfi srfi-34)
#:use-module (srfi srfi-35)
#:use-module (srfi srfi-64)
- #:use-module (srfi srfi-71)
#:use-module (rnrs bytevectors)
#:use-module (rnrs io ports)
#:use-module (ice-9 vlist)
--
2.33.0
From fd716c2924c96a0bf908f615adaa404a3e382e7c Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Mon, 30 Aug 2021 20:31:00 +0200
Subject: [PATCH 3/3] guix: Find 'let' binding when using guile@3.0.0.
Without this patch, errors like this result:
[ 90%] LOAD gnu/services/nfs.scm
WARNING: (gnu services nfs): imported module (guix) overrides core binding `let'
WARNING: (gnu services nfs): `let' imported from both (guile) and (guix)
WARNING: (gnu services nfs): imported module (guix) overrides core binding `let'
WARNING: (gnu services nfs): `let' imported from both (guile) and (guix)
ice-9/eval.scm:293:34: error: let: unbound variable
hint: Did you forget `(use-modules (srfi srfi-71))'?
I don't know why this happens, but this patch stops this error.
* guix.scm: Hide 'let' and 'let*' when importing (guix packages).
---
guix.scm | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
Toggle diff (18 lines)
diff --git a/guix.scm b/guix.scm
index 42bc8c8818..7e1e5fb109 100644
--- a/guix.scm
+++ b/guix.scm
@@ -36,5 +36,10 @@
(for-each (let ((i (module-public-interface (current-module))))
(lambda (m)
- (module-use! i (resolve-interface `(guix ,m)))))
+ (module-use! i (resolve-interface `(guix ,m)
+ ;; XXX: why is this required with Guile 3.0.2
+ ;; to allow (gnu services nfs) to compile?
+ #:hide (if (eq? m 'packages)
+ '(let let*)
+ '())))))
%public-modules)))
--
2.33.0
-----BEGIN PGP SIGNATURE-----
iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYS1NFBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7uRGAQDc1VPmwNOP//dxPgllVKgPKhvI
3Znr3Rj9mgTrf+uu6gD+Nn9JXVUAeEE9n1QqAikWd990OYVfnqw5RNqVCfuKNAM=
=cosF
-----END PGP SIGNATURE-----