diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-05-09 14:01:03 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-05-09 14:02:45 +0000 |
commit | 2023766e31d99080ae615fc3a9293fd0228703cc (patch) | |
tree | a82ed131b9e08ce926f28ebc8df474b03a42a3f9 /pkgs/test | |
parent | a295c4566e43e71d3944ee435629cf7ec5e181f7 (diff) |
tests.stdenv.test-inputDerivation: init
Diffstat (limited to 'pkgs/test')
-rw-r--r-- | pkgs/test/stdenv/default.nix | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/pkgs/test/stdenv/default.nix b/pkgs/test/stdenv/default.nix index 7648b430c5f8f..0fa87cccc2199 100644 --- a/pkgs/test/stdenv/default.nix +++ b/pkgs/test/stdenv/default.nix @@ -142,6 +142,21 @@ in ''; }; + test-inputDerivation = let + inherit (stdenv.mkDerivation { + dep1 = derivation { name = "dep1"; builder = "/bin/sh"; args = [ "-c" ": > $out" ]; system = builtins.currentSystem; }; + dep2 = derivation { name = "dep2"; builder = "/bin/sh"; args = [ "-c" ": > $out" ]; system = builtins.currentSystem; }; + passAsFile = [ "dep2" ]; + }) inputDerivation; + in + runCommand "test-inputDerivation" { + exportReferencesGraph = [ "graph" inputDerivation ]; + } '' + grep ${inputDerivation.dep1} graph + grep ${inputDerivation.dep2} graph + touch $out + ''; + test-prepend-append-to-var = testPrependAndAppendToVar { name = "test-prepend-append-to-var"; stdenv' = bootStdenv; |