From 6cbf845dcb3e4bb42e53963095d8a00163a09a32 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sat, 25 Jan 2025 20:57:29 +0100 Subject: [PATCH] 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". --- pkgs/by-name/oh/oh-my-fish/package.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/oh/oh-my-fish/package.nix b/pkgs/by-name/oh/oh-my-fish/package.nix index b91a89c0beb1..b93eb00d7862 100644 --- a/pkgs/by-name/oh/oh-my-fish/package.nix +++ b/pkgs/by-name/oh/oh-my-fish/package.nix @@ -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