diff --git a/garlic/stages/experiment/default.nix b/garlic/stages/experiment.nix similarity index 100% rename from garlic/stages/experiment/default.nix rename to garlic/stages/experiment.nix diff --git a/garlic/stages/experiment/old.nix b/garlic/stages/experiment/old.nix deleted file mode 100644 index 763bdb4..0000000 --- a/garlic/stages/experiment/old.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ - stdenv -, nixPrefix ? "" -}: - -apps: # Each app must be unique - -stdenv.mkDerivation { - name = "launcher"; - preferLocalBuild = true; - - buildInputs = [] ++ apps; - apps = apps; - phases = [ "unpackPhase" "patchPhase" "installPhase" ]; - dontPatchShebangs = true; - programPath = "/bin/run"; - - src = ./.; - - inherit nixPrefix; - - patchPhase = '' - substituteAllInPlace run - ''; - - installPhase = '' - mkdir -p $out/apps - for j in $apps; do - target=$out/apps/$(basename $j) - if [ -e $target ]; then - echo "Duplicated app: $j" - echo - echo "Provided apps: " - printf "%s\n" $apps - echo - exit 1 - fi - ln -s $j $target - done - - mkdir -p $out/bin - install -m755 run $out/bin/run - chmod +x $out/bin/* - - # Mark the launcher for upload - touch $out/.upload-to-mn - # And mark it as an experiment - touch $out/.experiment - ''; -} diff --git a/garlic/stages/experiment/run b/garlic/stages/experiment/run deleted file mode 100644 index 3c98c2c..0000000 --- a/garlic/stages/experiment/run +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -ex - ->&2 echo "Running launcher" - -if [ ! -e "/nix" ]; then - >&2 echo "missing /nix" - exit 1 -fi - -if [ -z "$GARLIC_OUT" ]; then - >&2 echo "GARLIC_OUT is not set" - exit 1 -fi - -mkdir -p "$GARLIC_OUT" -cd "$GARLIC_OUT" - -for j in @out@/apps/*; do - $j/bin/run -done