aboutsummaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-08-14 18:36:01 +0200
committerLudovic Courtès <ludo@gnu.org>2012-08-14 18:42:46 +0200
commitb86b00567c82e0e16a3cfa65b3f87d95f31506bb (patch)
tree941eb32405715acea95b3bd9072c6243dd416118 /guix
parented795c060858f3949bf5ad321008626f5e7f195a (diff)
downloadgnu-guix-b86b00567c82e0e16a3cfa65b3f87d95f31506bb.tar
gnu-guix-b86b00567c82e0e16a3cfa65b3f87d95f31506bb.tar.gz
build: Pass $(NIX_INSTANTIATE) to the build and test environments.
* Makefile.am (.scm.go): Define $NIX_INSTANTIATE. (TESTS_ENVIRONMENT): Likewise, and define $NIX_HASH. * guix/utils.scm (nixpkgs-derivation): Use $NIX_INSTANTIATE when defined. * tests/utils.scm (%nix-hash): New variable. ("sha256 & bytevector->nix-base32-string"): Use it.
Diffstat (limited to 'guix')
-rw-r--r--guix/utils.scm5
1 files changed, 3 insertions, 2 deletions
diff --git a/guix/utils.scm b/guix/utils.scm
index 66563c727e..cbd51fae73 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -450,8 +450,9 @@ starting from the right of S."
(define (nixpkgs-derivation attribute)
"Return the derivation path of ATTRIBUTE in Nixpkgs."
- (let* ((p (open-pipe* OPEN_READ "nix-instantiate" "-A"
- attribute (%nixpkgs-directory)))
+ (let* ((p (open-pipe* OPEN_READ (or (getenv "NIX_INSTANTIATE")
+ "nix-instantiate")
+ "-A" attribute (%nixpkgs-directory)))
(l (read-line p))
(s (close-pipe p)))
(and (zero? (status:exit-val s))