From d69bec62c00cba506fa882e20758bc1e30180864 Mon Sep 17 00:00:00 2001 From: r-vdp Date: Wed, 24 Jun 2026 13:41:57 +0200 Subject: [PATCH] fish: fix fishConfig test for embedded web_config share/fish/tools/ is no longer installed, so extract the embedded web_config files via `status get-file`. --- pkgs/by-name/fi/fish/package.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) 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