anchor.diff:      # Test the fish_config tool by checking the generated splash page.
       # Since the webserver requires a port to run, it is not started.
       fishConfig =
  -      let fishScript = writeText "test.fish" ''
  -        set -x __fish_bin_dir ${fish}/bin
  -        echo $__fish_bin_dir
  -        cp -r ${fish}/share/fish/tools/web_config/* .
  -        chmod -R +w *
  -        # we delete everything after the fileurl is assigned
  -        sed -e '/fileurl =/q' -i webconfig.py
  -        echo "print(fileurl)" >> webconfig.py
  -        # and check whether the message appears on the page
  -        cat (${python3}/bin/python ./webconfig.py \
  -          | tail -n1 | sed -ne 's|.*\(/tmp/.*\)|\1|p' \
  -        ) | grep 'a href="http://localhost.*Start the Fish Web config'
  -
  -        # cannot test the http server because it needs a localhost port
  -      '';
  +      let
  +        fishScript = writeText "test.fish" ''
  +          set -x __fish_bin_dir ${fish}/bin
  +          echo $__fish_bin_dir
  +          cp -r ${fish}/share/fish/tools/web_config/* .
  +          chmod -R +w *
  +          # we delete everything after the fileurl is assigned
  +          sed -e '/fileurl =/q' -i webconfig.py
  +          echo "print(fileurl)" >> webconfig.py
  +          # and check whether the message appears on the page
  +          cat (${python3}/bin/python ./webconfig.py \
  +            | tail -n1 | sed -ne 's|.*\(/tmp/.*\)|\1|p' \
  +          ) | grep 'a href="http://localhost.*Start the Fish Web config'
  +
  +          # cannot test the http server because it needs a localhost port
  +        '';
         in ''
           HOME=$(mktemp -d)
           ${fish}/bin/fish ${fishScript}
  
positive.code:     ############### ↑ Nix hook for sourcing /etc/fish/config.fish ↑ ###############
    '';
  
    fishPreInitHooks = ''
      # 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)
  
negative.code:   };
  
    # FIXME(Profpatsch) replace withTests stub
    withTests = with lib; flip const;
  in
  withTests tests fish
  