mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-05-26 19:11:46 +02:00
packages: Turn 'bag->derivation' into a monadic procedure.
* guix/packages.scm (bag->derivation): Turn into a monadic procedure by
remove 'store' parameter and removing the call to 'store-lower'.
(bag->cross-derivation): Likewise.
(bag->derivation*): New procedure.
(package-derivation, package-cross-derivation): Use it instead of
'bag->derivation'.
* tests/packages.scm ("bag->derivation"): Change to monadic style.
("bag->derivation, cross-compilation"): Likewise.
This commit is contained in:
+5
-3
@@ -1243,12 +1243,13 @@
|
||||
(parameterize ((%current-target-system #f))
|
||||
(bag-transitive-inputs bag)))))
|
||||
|
||||
(test-assert "bag->derivation"
|
||||
(test-assertm "bag->derivation"
|
||||
(parameterize ((%graft? #f))
|
||||
(let ((bag (package->bag gnu-make))
|
||||
(drv (package-derivation %store gnu-make)))
|
||||
(parameterize ((%current-system "foox86-hurd")) ;should have no effect
|
||||
(equal? drv (bag->derivation %store bag))))))
|
||||
(mlet %store-monad ((bag-drv (bag->derivation bag)))
|
||||
(return (equal? drv bag-drv)))))))
|
||||
|
||||
(test-assert "bag->derivation, cross-compilation"
|
||||
(parameterize ((%graft? #f))
|
||||
@@ -1257,7 +1258,8 @@
|
||||
(drv (package-cross-derivation %store gnu-make target)))
|
||||
(parameterize ((%current-system "foox86-hurd") ;should have no effect
|
||||
(%current-target-system "foo64-linux-gnu"))
|
||||
(equal? drv (bag->derivation %store bag))))))
|
||||
(mlet %store-monad ((bag-drv (bag->derivation bag)))
|
||||
(return (equal? drv bag-drv)))))))
|
||||
|
||||
(when (or (not (network-reachable?)) (shebang-too-long?))
|
||||
(test-skip 1))
|
||||
|
||||
Reference in New Issue
Block a user