anchor.diff:    };
   
     # FIXME(Profpatsch) replace withTests stub
  -  withTests = flip const;
  -
  -in withTests tests fish
  +  withTests = with lib; flip const;
  +in
  +withTests tests fish
  
positive.code:       sed -i "s|command manpath|command ${man-db}/bin/manpath|"     \
                "$out/share/fish/functions/man.fish"
      '' + optionalString useOperatingSystemEtc ''
        tee -a $out/etc/fish/config.fish < ${(writeText "config.fish.appendix" etcConfigAppendixText)}
      '' + ''
        tee -a $out/share/fish/__fish_build_paths.fish < ${(writeText "__fish_build_paths_suffix.fish" fishPreInitHooks)}
      '';
  
      enableParallelBuilding = true;
  
      meta = with stdenv.lib; {
        description = "Smart and user-friendly command line shell";
        homepage = "http://fishshell.com/";
        license = licenses.gpl2;
  
negative.code: 
    fish = stdenv.mkDerivation rec {
      pname = "fish";
      version = "3.1.1";
  
      src = fetchurl {
        # 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 = "1f12c56v7n4s0f9mi9xinviwj6kpwlcjwaig1d4vsk5wlgp7ip07";
      };
  
      nativeBuildInputs = [
        cmake
      ];
  
      buildInputs = [
        ncurses
        libiconv
        pcre2
      ];
  
      preConfigure = ''
        patchShebangs ./build_tools/git_version_gen.sh
      '';
  
      # Required binaries during execution
      # Python: Autocompletion generated from manpages and config editing
      propagatedBuildInputs = [
        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 |"               \
  