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".
This commit is contained in:
Wolfgang Walther
2025-01-26 17:32:28 +01:00
parent 1c6126f709
commit 6cbf845dcb
+7 -5
View File
@@ -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