Unverified Commit 6cbf845d authored by Wolfgang Walther's avatar Wolfgang Walther
Browse files

oh-my-fish: fix omf-install script

Passing placeholder to substituteAll or replaceVars doesn't work as
expected, it will use the substituteAll's out path instead of the
"caller".
parent 1c6126f7
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
  fetchFromGitHub,
  fish,
  runtimeShell,
  substituteAll,
  replaceVars,
}:

stdenv.mkDerivation (finalAttrs: {
@@ -38,14 +38,16 @@ stdenv.mkDerivation (finalAttrs: {
    cp -vr * $out/share/oh-my-fish

    cp -v ${
      substituteAll {
        name = "omf-install";
        src = ./omf-install;
        omf = placeholder "out";
      replaceVars ./omf-install {
        inherit fish runtimeShell;
        # replaced below
        omf = null;
      }
    } $out/bin/omf-install

    substituteInPlace $out/bin/omf-install \
      --replace-fail '@omf@' "$out"

    chmod +x $out/bin/omf-install
    cat $out/bin/omf-install