summary refs log tree commit diff
path: root/Makefile.am
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 /Makefile.am
parented795c060858f3949bf5ad321008626f5e7f195a (diff)
downloadguix-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 'Makefile.am')
-rw-r--r--Makefile.am5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index f83c8eb1f5..51266585dc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -52,9 +52,11 @@ TESTS =						\
   tests/packages.scm
 
 TESTS_ENVIRONMENT =								\
+  NIX_HASH="$(NIX_HASH)";							\
+  NIX_INSTANTIATE="$(NIX_INSTANTIATE)";						\
   NIXPKGS="$(NIXPKGS)";								\
   GUILE_LOAD_COMPILED_PATH="$(top_builddir):$$GUILE_LOAD_COMPILED_PATH";	\
-  export NIXPKGS GUILE_LOAD_COMPILED_PATH;
+  export NIX_HASH NIX_INSTANTIATE NIXPKGS GUILE_LOAD_COMPILED_PATH;
 
 LOG_COMPILER =					\
   $(GUILE) --no-auto-compile -L "$(top_srcdir)"
@@ -70,6 +72,7 @@ CLEANFILES = $(GOBJECTS) *.log
 
 .scm.go:
 	$(MKDIR_P) `dirname "$@"`
+	NIX_INSTANTIATE="$(NIX_INSTANTIATE)"					\
 	NIXPKGS="$(NIXPKGS)"							\
 	GUILE_AUTO_COMPILE=0							\
 	GUILE_LOAD_COMPILED_PATH="$(top_builddir):$$GUILE_LOAD_COMPILED_PATH"	\