summaryrefslogtreecommitdiffstats
path: root/lib/tests/release.nix
diff options
context:
space:
mode:
authorNicolas B. Pierron <nicolas.b.pierron@gmail.com>2015-02-08 22:51:20 +0100
committerNicolas B. Pierron <nicolas.b.pierron@gmail.com>2015-02-09 00:07:44 +0100
commitde0f122b016c88ffdfa092a2acc0d6bd81e32613 (patch)
tree655b7fb13fbbb720cf8ece266d5383c4b43d0277 /lib/tests/release.nix
parent6d15e32536abbcef919b706f073c7fea46cf9229 (diff)
Issue #6161 - Register lib tests as release blockers.
Diffstat (limited to 'lib/tests/release.nix')
-rw-r--r--lib/tests/release.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/tests/release.nix b/lib/tests/release.nix
new file mode 100644
index 000000000000..e7fb52f67665
--- /dev/null
+++ b/lib/tests/release.nix
@@ -0,0 +1,31 @@
+{ nixpkgs }:
+
+with import ./../.. { };
+with lib;
+
+stdenv.mkDerivation {
+ name = "nixpkgs-lib-tests";
+ buildInputs = [ nix ];
+ NIX_PATH="nixpkgs=${nixpkgs}";
+
+ buildCommand = ''
+ datadir="${nix}/share"
+ export TEST_ROOT=$(pwd)/test-tmp
+ export NIX_STORE_DIR=$TEST_ROOT/store
+ export NIX_LOCALSTATE_DIR=$TEST_ROOT/var
+ export NIX_LOG_DIR=$TEST_ROOT/var/log/nix
+ export NIX_STATE_DIR=$TEST_ROOT/var/nix
+ export NIX_DB_DIR=$TEST_ROOT/db
+ export NIX_CONF_DIR=$TEST_ROOT/etc
+ export NIX_MANIFESTS_DIR=$TEST_ROOT/var/nix/manifests
+ export NIX_BUILD_HOOK=
+ export PAGER=cat
+ cacheDir=$TEST_ROOT/binary-cache
+ nix-store --init
+
+ cd ${nixpkgs}/lib/tests
+ ./modules.sh
+
+ touch $out
+ '';
+}