about summary refs log tree commit diff
path: root/pkgs/test/stdenv/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/test/stdenv/default.nix')
-rw-r--r--pkgs/test/stdenv/default.nix22
1 files changed, 22 insertions, 0 deletions
diff --git a/pkgs/test/stdenv/default.nix b/pkgs/test/stdenv/default.nix
index 3882eb2b625c5..e06759fa28bd4 100644
--- a/pkgs/test/stdenv/default.nix
+++ b/pkgs/test/stdenv/default.nix
@@ -166,6 +166,28 @@ in
       touch $out
     '';
 
+  test-inputDerivation-fixed-output = 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; };
+      name = "meow";
+      outputHash = "sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=";
+      outputHashMode = "flat";
+      outputHashAlgo = "sha256";
+      buildCommand = ''
+        touch $out
+      '';
+      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;