diff options
Diffstat (limited to 'lib/tests/release.nix')
-rw-r--r-- | lib/tests/release.nix | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/tests/release.nix b/lib/tests/release.nix new file mode 100644 index 00000000000..e7fb52f6766 --- /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 + ''; +} |