diff --git a/garlic/stages/experiment.nix b/garlic/stages/experiment.nix index 91067f8..ec5f752 100644 --- a/garlic/stages/experiment.nix +++ b/garlic/stages/experiment.nix @@ -24,6 +24,8 @@ stdenv.mkDerivation { dontPatchShebangs = true; inherit units; + isExperiment = true; + installPhase = '' cat > $out << EOF #!/bin/sh diff --git a/garlic/tools.nix b/garlic/tools.nix index a3aef52..0c29722 100644 --- a/garlic/tools.nix +++ b/garlic/tools.nix @@ -40,7 +40,9 @@ let else "${stage}"; /* Given a trebuchet, returns the experiment */ - getExperimentStage = drv: drv.nextStage.nextStage.nextStage; + getExperimentStage = drv: + if (drv ? isExperiment) && drv.isExperiment then drv + else getExperimentStage drv.nextStage; # Computes the exponentiation operation pow = x: n: fold (a: b: a*b) 1 (map (a: x) (range 1 n));