From dfc8ccbf5da96a67eb1cade499f0def21e7fdb02 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Tue, 31 Dec 2019 09:56:51 +0100 Subject: system: Stop using canonical-package. Usage of canonical-package outside of thunked fields breaks cross-compilation, see: https://lists.gnu.org/archive/html/guix-devel/2019-12/msg00410.html. * gnu/installer.scm (installer-program): Remove canonical-package. * gnu/services/base.scm (): Ditto, (%base-services): ditto. * gnu/services/xorg.scm: Remove useless canonical-package import. * gnu/system.scm (%base-packages): Remove canonical-package. * gnu/system/install.scm (%installation-services): Ditto, (installation-os): ditto. * gnu/system/locale.scm (single-locale-directory): Ditto. --- gnu/installer.scm | 24 ++++++++++++------------ gnu/services/base.scm | 10 ++++------ gnu/services/xorg.scm | 2 +- gnu/system.scm | 9 ++------- gnu/system/install.scm | 7 +++---- gnu/system/locale.scm | 2 +- 6 files changed, 23 insertions(+), 31 deletions(-) diff --git a/gnu/installer.scm b/gnu/installer.scm index 1676a91801..6766037aae 100644 --- a/gnu/installer.scm +++ b/gnu/installer.scm @@ -291,18 +291,18 @@ (define init-gettext (define set-installer-path ;; Add the specified binary to PATH for later use by the installer. #~(let* ((inputs - '#$(append (list bash ;start subshells - connman ;call connmanctl - cryptsetup - dosfstools ;mkfs.fat - e2fsprogs ;mkfs.ext4 - btrfs-progs ;mkfs.btrfs - jfsutils ;jfs_mkfs - kbd ;chvt - guix ;guix system init call - util-linux ;mkwap - shadow) - (map canonical-package (list coreutils))))) + '#$(list bash ;start subshells + connman ;call connmanctl + cryptsetup + dosfstools ;mkfs.fat + e2fsprogs ;mkfs.ext4 + btrfs-progs + jfsutils ;jfs_mkfs + kbd ;chvt + guix ;guix system init call + util-linux ;mkwap + shadow + coreutils))) (with-output-to-port (%make-void-port "w") (lambda () (set-path-environment-variable "PATH" '("bin" "sbin") inputs))))) diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 0c154d1c4e..6988edc249 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -45,7 +45,7 @@ (define-module (gnu services base) #:select (alsa-utils crda eudev e2fsprogs fuse gpm kbd lvm2 rng-tools)) #:use-module (gnu packages bash) #:use-module ((gnu packages base) - #:select (canonical-package coreutils glibc glibc-utf8-locales)) + #:select (coreutils glibc glibc-utf8-locales)) #:use-module (gnu packages package-management) #:use-module ((gnu packages gnupg) #:select (guile-gcrypt)) #:use-module (gnu packages linux) @@ -1212,7 +1212,7 @@ (define-record-type* nscd-configuration (name-services nscd-configuration-name-services ;list of (default '())) (glibc nscd-configuration-glibc ; - (default (canonical-package glibc)))) + (default glibc))) (define-record-type* nscd-cache make-nscd-cache nscd-cache? @@ -2445,9 +2445,7 @@ (define %base-services (rules (list lvm2 fuse alsa-utils crda)))) (service special-files-service-type - `(("/bin/sh" ,(file-append (canonical-package bash) - "/bin/sh")) - ("/usr/bin/env" ,(file-append (canonical-package coreutils) - "/bin/env")))))) + `(("/bin/sh" ,(file-append bash "/bin/sh")) + ("/usr/bin/env" ,(file-append coreutils "/bin/env")))))) ;;; base.scm ends here diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index 73a32e4b02..881521cccf 100644 --- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm @@ -29,7 +29,7 @@ (define-module (gnu services xorg) #:use-module (gnu system keyboard) #:use-module (gnu services base) #:use-module (gnu services dbus) - #:use-module ((gnu packages base) #:select (canonical-package)) + #:use-module (gnu packages base) #:use-module (gnu packages guile) #:use-module (gnu packages xorg) #:use-module (gnu packages fonts) diff --git a/gnu/system.scm b/gnu/system.scm index 01baa248a2..d3f2b82519 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -590,18 +590,13 @@ (define %base-packages bash-completion - ;; XXX: We don't use (canonical-package guile-2.2) here because that - ;; would create a collision in the global profile between the GMP - ;; variant propagated by 'guile-final' and the GMP variant propagated - ;; by 'gnutls', itself propagated by 'guix'. guile-2.2 guile-readline guile-colorized ;; The packages below are also in %FINAL-INPUTS, so take them from ;; there to avoid duplication. - (map canonical-package - (list bash coreutils findutils grep sed - diffutils patch gawk tar gzip bzip2 xz lzip)))) + (list bash coreutils findutils grep sed + diffutils patch gawk tar gzip bzip2 xz lzip))) (define %default-issue ;; Default contents for /etc/issue. diff --git a/gnu/system/install.scm b/gnu/system/install.scm index c15c2c7814..0dc26b2871 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -384,8 +384,7 @@ (define bare-bones-os ;; Having /bin/sh is a good idea. In particular it allows Tramp ;; connections to this system to work. (service special-files-service-type - `(("/bin/sh" ,(file-append (canonical-package bash) - "/bin/sh")))) + `(("/bin/sh" ,(file-append bash "/bin/sh")))) ;; Loopback device, needed by OpenSSH notably. (service static-networking-service-type @@ -408,7 +407,7 @@ (define bare-bones-os (list bare-bones-os glibc-utf8-locales texinfo - (canonical-package guile-2.2)))))) + guile-2.2))))) (define %issue ;; Greeting. @@ -480,7 +479,7 @@ (define installation-os ;; Explicitly allow for empty passwords. (base-pam-services #:allow-empty-passwords? #t)) - (packages (cons* (canonical-package glibc) ;for 'tzselect' & co. + (packages (cons* glibc ;for 'tzselect' & co. parted gptfdisk ddrescue fontconfig font-dejavu font-gnu-unifont diff --git a/gnu/system/locale.scm b/gnu/system/locale.scm index 8466d5b07d..5baf80622c 100644 --- a/gnu/system/locale.scm +++ b/gnu/system/locale.scm @@ -86,7 +86,7 @@ (define (locale-name->definition name) #f))) (define* (single-locale-directory locales - #:key (libc (canonical-package glibc))) + #:key (libc glibc)) "Return a directory containing all of LOCALES for LIBC compiled. Because locale data formats are incompatible when switching from one libc to -- cgit v1.2.3