summaryrefslogtreecommitdiff
path: root/guix/packages.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-07-13 16:43:58 +0200
committerLudovic Courtès <ludo@gnu.org>2020-07-13 16:49:12 +0200
commitefb10f175fa6323024aa471c58ea1da445085298 (patch)
tree8eba01ff5cfc68261510776e6dc5cf58259f6c2a /guix/packages.scm
parent399d89b5c8cf60f0ef4f4f5e1699c5d92a51f015 (diff)
packages: Ensure bags are insensitive to '%current-system'.
Fixes <https://bugs.gnu.org/42327>. Reported by Jan Nieuwenhuizen <janneke@gnu.org>. This is a followup to f52fbf7094c9c346d38ad469cc8d92d18387786e. * guix/packages.scm (bag-transitive-inputs, bag-transitive-build-inputs) (bag-transitive-host-inputs, bag-transitive-target-inputs): Parameterize %CURRENT-SYSTEM in addition to %CURRENT-TARGET-SYSTEM. * tests/packages.scm ("package->bag, sensitivity to %current-system"): New test.
Diffstat (limited to 'guix/packages.scm')
-rw-r--r--guix/packages.scm12
1 files changed, 8 insertions, 4 deletions
diff --git a/guix/packages.scm b/guix/packages.scm
index 68ef718872..95d7c2cc0d 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -923,22 +923,26 @@ dependencies are known to build on SYSTEM."
(define (bag-transitive-inputs bag)
"Same as 'package-transitive-inputs', but applied to a bag."
- (parameterize ((%current-target-system #f))
+ (parameterize ((%current-target-system #f)
+ (%current-system (bag-system bag)))
(transitive-inputs (bag-direct-inputs bag))))
(define (bag-transitive-build-inputs bag)
"Same as 'package-transitive-native-inputs', but applied to a bag."
- (parameterize ((%current-target-system #f))
+ (parameterize ((%current-target-system #f)
+ (%current-system (bag-system bag)))
(transitive-inputs (bag-build-inputs bag))))
(define (bag-transitive-host-inputs bag)
"Same as 'package-transitive-target-inputs', but applied to a bag."
- (parameterize ((%current-target-system (bag-target bag)))
+ (parameterize ((%current-target-system (bag-target bag))
+ (%current-system (bag-system bag)))
(transitive-inputs (bag-host-inputs bag))))
(define (bag-transitive-target-inputs bag)
"Return the \"target inputs\" of BAG, recursively."
- (parameterize ((%current-target-system (bag-target bag)))
+ (parameterize ((%current-target-system (bag-target bag))
+ (%current-system (bag-system bag)))
(transitive-inputs (bag-target-inputs bag))))
(define* (package-closure packages #:key (system (%current-system)))