anchor.diff:  
     fish = stdenv.mkDerivation rec {
       pname = "fish";
  -    version = "3.1.0";
  -
  -    etcConfigAppendix = builtins.toFile "etc-config.appendix.fish" etcConfigAppendixText;
  +    version = "3.1.1";
   
       src = fetchurl {
  -      # There are differences between the release tarball and the tarball github packages from the tag
  -      # Hence we cannot use fetchFromGithub
  +      # There are differences between the release tarball and the tarball GitHub
  +      # packages from the tag. Specifically, it comes with a file containing its
  +      # version, which is used in `build_tools/git_version_gen.sh` to determine
  +      # the shell's actual version (and what it displays when running `fish
  +      # --version`), as well as the local documentation for all builtins (and
  +      # maybe other things).
         url = "https://github.com/fish-shell/fish-shell/releases/download/${version}/${pname}-${version}.tar.gz";
  -      sha256 = "0s2356mlx7fp9kgqgw91lm5ds2i9iq9hq071fbqmcp3875l1xnz5";
  +      sha256 = "1f12c56v7n4s0f9mi9xinviwj6kpwlcjwaig1d4vsk5wlgp7ip07";
       };
   
  -    nativeBuildInputs = [ cmake ];
  -    buildInputs = [ ncurses libiconv pcre2 ];
  +    nativeBuildInputs = [
  +      cmake
  +    ];
  +
  +    buildInputs = [
  +      ncurses
  +      libiconv
  +      pcre2
  +    ];
   
       preConfigure = ''
         patchShebangs ./build_tools/git_version_gen.sh
       '';
   
  -    patches = [
  -      # Fixes compilation on old Apple SDKs
  -      (fetchpatch {
  -        url = "https://github.com/fish-shell/fish-shell/commit/10385d422b3e2a823faebfdaf13edd0e7f48a27f.patch";
  -        sha256 = "0hj13kyjf5wr9j5afd4mfylcr7mz68ilbncbcf307drk1lv1lvrn";
  -      })
  -    ];
  -
       # Required binaries during execution
       # Python: Autocompletion generated from manpages and config editing
       propagatedBuildInputs = [
  -      coreutils gnugrep gnused
  -      python3 groff gettext
  -    ] ++ optional (!stdenv.isDarwin) man-db;
  -
  -    postInstall = ''
  +      coreutils
  +      gnugrep
  +      gnused
  +      python3
  +      groff
  +      gettext
  +    ] ++ lib.optional (!stdenv.isDarwin) man-db;
  +
  +    postInstall = with lib; ''
         sed -r "s|command grep|command ${gnugrep}/bin/grep|" \
             -i "$out/share/fish/functions/grep.fish"
         sed -i "s|which |${which}/bin/which |"               \
  
positive.code: { stdenv, fetchurl, coreutils, utillinux,
    which, gnused, gnugrep,
    groff, man-db, getent, libiconv, pcre2,
    gettext, ncurses, python3,
    cmake
    , fetchpatch
  
    , writeText
    , nixosTests
    , useOperatingSystemEtc ? true
  
  }:
  
  with stdenv.lib;
  
  let
    etcConfigAppendixText = ''
      ############### ↓ Nix hook for sourcing /etc/fish/config.fish ↓ ###############
      #                                                                             #
      # Origin:
  
negative.code:     ############### ↑ Nix hook for sourcing /etc/fish/config.fish ↑ ###############
    '';
  
    fishPreInitHooks = writeText "__fish_build_paths_suffix.fish" ''
      # source nixos environment
      # note that this is required:
      #   1. For all shells, not just login shells (mosh needs this as do some other command-line utilities)
  