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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user