From 2b6fe60599d52b449bbf531cfdc4dbf18a14eb2c Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 27 Mar 2020 18:36:20 +0100 Subject: packages: Use Guile 3.0 for grafts. * guix/packages.scm (guile-2.0): Rename to... (guile-for-grafts): ... this, and adjust callers. Refer to 'guile-3.0' instead of 'guile-2.0'. --- guix/packages.scm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'guix/packages.scm') diff --git a/guix/packages.scm b/guix/packages.scm index 70b1478c91..2552f8bf7c 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -444,12 +444,12 @@ derivations." (let ((distro (resolve-interface '(gnu packages commencement)))) (module-ref distro 'guile-final))) -(define (guile-2.0) - "Return Guile 2.0." - ;; FIXME: This is used as a workaround for when +(define (guile-for-grafts) + "Return the Guile package used to build grafting derivations." + ;; Guile 2.2 would not work due to when ;; grafting packages. (let ((distro (resolve-interface '(gnu packages guile)))) - (module-ref distro 'guile-2.0))) + (module-ref distro 'guile-3.0))) (define* (default-guile-derivation #:optional (system (%current-system))) "Return the derivation for SYSTEM of the default Guile package used to run @@ -1269,7 +1269,7 @@ This is an internal procedure." (() drv) (grafts - (let ((guile (package-derivation store (guile-2.0) + (let ((guile (package-derivation store (guile-for-grafts) system #:graft? #f))) ;; TODO: As an optimization, we can simply graft the tip ;; of the derivation graph since 'graft-derivation' @@ -1295,7 +1295,7 @@ system identifying string)." (graft-derivation store drv grafts #:system system #:guile - (package-derivation store (guile-2.0) + (package-derivation store (guile-for-grafts) system #:graft? #f)))) drv)))) -- cgit v1.2.3 From 033df23680cce1b3ccd9c83b97d8c200176cdb0a Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 29 Mar 2020 15:35:47 +0200 Subject: packages: Change 'guile-for-grafts' back to 2.0. This reverts 2b6fe60599d52b449bbf531cfdc4dbf18a14eb2c, due to reports of segfaults of Guile 3.0.2 during grafting. * guix/packages.scm (guile-for-grafts): Change back to GUILE-2.0. --- guix/packages.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'guix/packages.scm') diff --git a/guix/packages.scm b/guix/packages.scm index 2552f8bf7c..e2578101ee 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès +;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès ;;; Copyright © 2014, 2015, 2017, 2018 Mark H Weaver ;;; Copyright © 2015 Eric Bavier ;;; Copyright © 2016 Alex Kost @@ -449,7 +449,7 @@ derivations." ;; Guile 2.2 would not work due to when ;; grafting packages. (let ((distro (resolve-interface '(gnu packages guile)))) - (module-ref distro 'guile-3.0))) + (module-ref distro 'guile-2.0))) (define* (default-guile-derivation #:optional (system (%current-system))) "Return the derivation for SYSTEM of the default Guile package used to run -- cgit v1.2.3 From 9f7855299604c496d2d2f12041974e33baa0d63b Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 29 Mar 2020 16:14:14 +0200 Subject: packages: 'package->bag' keys cache by replacement. * guix/packages.scm (package->bag): When GRAFT? is true, use PACKAGE's replacement as the cache key. Remove GRAFT? from the list of secondary cache keys. --- guix/packages.scm | 66 +++++++++++++++++++++++++++---------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) (limited to 'guix/packages.scm') diff --git a/guix/packages.scm b/guix/packages.scm index e2578101ee..04d9b7824c 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -1029,39 +1029,39 @@ information in exceptions." #:key (graft? (%graft?))) "Compile PACKAGE into a bag for SYSTEM, possibly cross-compiled to TARGET, and return it." - (cached (=> %bag-cache) - package (list system target graft?) - ;; Bind %CURRENT-SYSTEM and %CURRENT-TARGET-SYSTEM so that thunked - ;; field values can refer to it. - (parameterize ((%current-system system) - (%current-target-system target)) - (match (if graft? - (or (package-replacement package) package) - package) - ((and self - ($ name version source build-system - args inputs propagated-inputs native-inputs - outputs)) - ;; Even though we prefer to use "@" to separate the package - ;; name from the package version in various user-facing parts - ;; of Guix, checkStoreName (in nix/libstore/store-api.cc) - ;; prohibits the use of "@", so use "-" instead. - (or (make-bag build-system (string-append name "-" version) - #:system system - #:target target - #:source source - #:inputs (append (inputs self) - (propagated-inputs self)) - #:outputs outputs - #:native-inputs (native-inputs self) - #:arguments (args self)) - (raise (if target - (condition - (&package-cross-build-system-error - (package package))) - (condition - (&package-error - (package package))))))))))) + (let ((package (or (and graft? (package-replacement package)) + package))) + (cached (=> %bag-cache) + package (list system target) + ;; Bind %CURRENT-SYSTEM and %CURRENT-TARGET-SYSTEM so that thunked + ;; field values can refer to it. + (parameterize ((%current-system system) + (%current-target-system target)) + (match package + ((and self + ($ name version source build-system + args inputs propagated-inputs native-inputs + outputs)) + ;; Even though we prefer to use "@" to separate the package + ;; name from the package version in various user-facing parts + ;; of Guix, checkStoreName (in nix/libstore/store-api.cc) + ;; prohibits the use of "@", so use "-" instead. + (or (make-bag build-system (string-append name "-" version) + #:system system + #:target target + #:source source + #:inputs (append (inputs self) + (propagated-inputs self)) + #:outputs outputs + #:native-inputs (native-inputs self) + #:arguments (args self)) + (raise (if target + (condition + (&package-cross-build-system-error + (package package))) + (condition + (&package-error + (package package)))))))))))) (define %graft-cache ;; 'eq?' cache mapping package objects to a graft corresponding to their -- cgit v1.2.3