From ed6956e23fe94696d1e8544a34ce47e3f7415733 Mon Sep 17 00:00:00 2001 From: Gaute Ravndal Date: Thu, 13 Nov 2025 15:12:28 +0100 Subject: [PATCH] fish: misc fixes for new default standalone build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fish no longer sources most files in `$out/share/fish` with 4.2.0, and instead embeds these files in the fish binary itself: > The standalone build mode has been made the default. This means that > the files in $CMAKE_INSTALL_PREFIX/share/fish will not be used > anymore, except for HTML docs. As a result, future upgrades will no > longer break running shells if one of fish’s internal helper functions > has been changed in the updated version. For now, the data files are > still installed redundantly, to prevent upgrades from breaking > already-running shells. To reverse this change (which should not be > necessary), patch out the embed-data feature from cmake/Rust.cmake. > This option will be removed in future. This means that any changes to these files now have to be made the input before the build system tries to embed them. --- pkgs/by-name/fi/fish/package.nix | 61 ++++++++++++++++---------------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/pkgs/by-name/fi/fish/package.nix b/pkgs/by-name/fi/fish/package.nix index 30973f400d7d..8e4eb382bd41 100644 --- a/pkgs/by-name/fi/fish/package.nix +++ b/pkgs/by-name/fi/fish/package.nix @@ -240,6 +240,36 @@ stdenv.mkDerivation (finalAttrs: { + lib.optionalString (stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isDarwin) '' # This test seems to consistently fail on aarch64 and darwin rm tests/checks/cd.fish + '' + + '' + substituteInPlace share/functions/grep.fish \ + --replace-fail "command grep" "command ${lib.getExe gnugrep}" + + substituteInPlace share/completions/{sudo.fish,doas.fish} \ + --replace-fail "/usr/local/sbin /sbin /usr/sbin" "" + '' + + lib.optionalString usePython '' + cat > share/functions/__fish_anypython.fish < $out/share/fish/functions/__fish_anypython.fish <