3
0
Fork 0
forked from mirrors/nixpkgs

tests.stdenv.test-inputDerivation: init

This commit is contained in:
Alyssa Ross 2023-05-09 14:01:03 +00:00
parent a295c4566e
commit 2023766e31
No known key found for this signature in database
GPG key ID: F9DBED4859B271C0

View file

@ -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;