diff --git a/pkgs/by-name/fi/fish/package.nix b/pkgs/by-name/fi/fish/package.nix index 300538248ede..1aa932517d06 100644 --- a/pkgs/by-name/fi/fish/package.nix +++ b/pkgs/by-name/fi/fish/package.nix @@ -404,10 +404,17 @@ stdenv.mkDerivation (finalAttrs: { fishConfig = let fishScript = writeText "test.fish" '' - set -x __fish_bin_dir ${finalAttrs.finalPackage}/bin - echo $__fish_bin_dir - cp -r ${finalAttrs.finalPackage}/share/fish/tools/web_config/* . - chmod -R +w * + # webconfig.py locates fish via $fish_bin_dir, which fish_config + # normally exports from the read-only $__fish_bin_dir. + set -x fish_bin_dir $__fish_bin_dir + echo $fish_bin_dir + + # The web_config tool is embedded in the binary, so extract it. + for f in (status list-files tools/web_config) + mkdir -p (path dirname $f) + status get-file $f > $f + end + cd tools/web_config # if we don't set `delete=False`, the file will get cleaned up # automatically (leading the test to fail because there's no