aboutsummaryrefslogtreecommitdiff
path: root/tests/multiple-outputs.nix
diff options
context:
space:
mode:
Diffstat (limited to 'tests/multiple-outputs.nix')
-rw-r--r--tests/multiple-outputs.nix23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/multiple-outputs.nix b/tests/multiple-outputs.nix
new file mode 100644
index 000000000..e8fbf91bf
--- /dev/null
+++ b/tests/multiple-outputs.nix
@@ -0,0 +1,23 @@
+with import ./config.nix;
+
+let
+
+ a = mkDerivation {
+ name = "multiple-outputs-a";
+ outputs = [ "first" "second" ];
+ builder = ./multiple-outputs.a.builder.sh;
+ helloString = "Hello, world!";
+ };
+
+in
+
+assert a.second.helloString == "Hello, world!";
+
+mkDerivation {
+ defaultOutput = a;
+ firstOutput = a.first.first;
+ secondOutput = a.second.first.first.second.second.first.second;
+ allOutputs = a.all;
+ name = "multiple-outputs-b";
+ builder = ./multiple-outputs.b.builder.sh;
+}