summaryrefslogtreecommitdiff
path: root/guix/packages.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2020-03-30 12:17:33 +0200
committerMarius Bakke <mbakke@fastmail.com>2020-03-30 12:17:33 +0200
commitae0badf5bb791428423a98d4e4e2b8d297a5d4be (patch)
tree4282d243db3e90839a5f7d3b5878674ccd0e2e14 /guix/packages.scm
parentee401ed9249fbe284ef1b9b437d39207ca88131b (diff)
parent927f3655662b41f25225ea03baa3ded687aa7cbb (diff)
downloadguix-patches-ae0badf5bb791428423a98d4e4e2b8d297a5d4be.tar
guix-patches-ae0badf5bb791428423a98d4e4e2b8d297a5d4be.tar.gz
Merge branch 'master' into core-updates
Conflicts: gnu/packages/admin.scm gnu/packages/commencement.scm gnu/packages/guile.scm gnu/packages/linux.scm gnu/packages/package-management.scm gnu/packages/pulseaudio.scm gnu/packages/web.scm
Diffstat (limited to 'guix/packages.scm')
-rw-r--r--guix/packages.scm76
1 files changed, 38 insertions, 38 deletions
diff --git a/guix/packages.scm b/guix/packages.scm
index ef96b5692f..567240f54e 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -444,9 +444,9 @@ 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 <https://bugs.gnu.org/28211> when
+(define (guile-for-grafts)
+ "Return the Guile package used to build grafting derivations."
+ ;; Guile 2.2 would not work due to <https://bugs.gnu.org/28211> when
;; grafting packages.
(let ((distro (resolve-interface '(gnu packages guile))))
(module-ref distro 'guile-2.0)))
@@ -1031,39 +1031,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
- ($ <package> 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
+ ($ <package> 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
@@ -1271,7 +1271,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'
@@ -1297,7 +1297,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))))