From daa0dda76ddd869c8b2866fcf2866667b69461ad Mon Sep 17 00:00:00 2001 From: Jonathan Brielmaier Date: Fri, 18 Dec 2020 22:20:23 +0100 Subject: [PATCH] nongnu: Adapt linux-initrd to populate-store changes. Fixes https://gitlab.com/nonguix/nonguix/-/issues/81. Reported-by: Jean-Baptiste Volatier. Depends on https://git.savannah.gnu.org/cgit/guix.git/commit/?id=d88ff09. * nonguix/modules.scm (import-nonguix-module?): New variable. Export it instead of nonguix-module-name?. * nongnu/system/linux-initrd.scm (microcode-initrd): Use import-nonguix-module? instead of nonguix-module-name?. (combined-initrd): Dito. --- nongnu/system/linux-initrd.scm | 4 ++-- nonguix/modules.scm | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/nongnu/system/linux-initrd.scm b/nongnu/system/linux-initrd.scm index 460d48d..5b29235 100644 --- a/nongnu/system/linux-initrd.scm +++ b/nongnu/system/linux-initrd.scm @@ -46,7 +46,7 @@ MICROCODE-PACKAGES, in the format expected by the kernel." '((gnu build linux-initrd) (guix build utils) (nonguix build utils)) - #:select? nonguix-module-name?) + #:select? import-nonguix-module?) #~(begin (use-modules (gnu build linux-initrd) (guix build utils) @@ -84,7 +84,7 @@ MICROCODE-PACKAGES, in the format expected by the kernel." (with-imported-modules (source-module-closure '((guix build utils) (nonguix build utils)) - #:select? nonguix-module-name?) + #:select? import-nonguix-module?) #~(begin (use-modules (guix build utils) (nonguix build utils)) diff --git a/nonguix/modules.scm b/nonguix/modules.scm index 570a8bb..24d4267 100644 --- a/nonguix/modules.scm +++ b/nonguix/modules.scm @@ -15,7 +15,7 @@ (define-module (nonguix modules) #:use-module (ice-9 match) - #:export (nonguix-module-name?)) + #:export (import-nonguix-module?)) (define (nonguix-module-name? name) "Return true if NAME (a list of symbols) denotes a Guix or Nonguix module." @@ -25,3 +25,11 @@ (('nonguix _ ...) #t) (('nongnu _ ...) #t) (_ #f))) + +;; Since we don't use deduplication support in 'populate-store', don't +;; import (guix store deduplication) and its dependencies, which +;; includes Guile-Gcrypt. +(define (import-nonguix-module? module) + "Return true if MODULE is not (guix store deduplication)" + (and (nonguix-module-name? module) + (not (equal? module '(guix store deduplication)))))