diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-08-17 21:08:06 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-08-17 21:08:06 +0200 |
commit | c90ddc8f811496e9da9ea1e6832a662bf767d6d9 (patch) | |
tree | 59e5ab505210a6190517292efc2ff49015b55e59 /tests/monads.scm | |
parent | 4231f05bbc29e4e3deffc9106a5faf14920979d3 (diff) | |
download | patches-c90ddc8f811496e9da9ea1e6832a662bf767d6d9.tar patches-c90ddc8f811496e9da9ea1e6832a662bf767d6d9.tar.gz |
monads: 'package-file' uses '%current-system' at '>>=' time.
* guix/monads.scm (package-file): Leave #:system to #f by default.
* tests/monads.scm ("package-file, default system"): New test.
Diffstat (limited to 'tests/monads.scm')
-rw-r--r-- | tests/monads.scm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/monads.scm b/tests/monads.scm index 78a014ea6a..b814b0f7c5 100644 --- a/tests/monads.scm +++ b/tests/monads.scm @@ -109,6 +109,20 @@ guile))) #:guile-for-build (package-derivation %store %bootstrap-guile))) +(test-assert "package-file, default system" + ;; The default system should be the one at '>>=' time, not the one at + ;; invocation time. See <http://bugs.gnu.org/18002>. + (run-with-store %store + (mlet* %store-monad + ((system -> (%current-system)) + (file (parameterize ((%current-system "foobar64-linux")) + (package-file coreutils "bin/ls"))) + (cu (package->derivation coreutils))) + (return (string=? file + (string-append (derivation->output-path cu) + "/bin/ls")))) + #:guile-for-build (package-derivation %store %bootstrap-guile))) + (test-assert "package-file + package->cross-derivation" (run-with-store %store (mlet* %store-monad ((file (package-file coreutils "bin/ls" |