Unverified Commit 4f99d4b1 authored by loner's avatar loner
Browse files

fish: 4.1.2 -> 4.2.0

parent 2ce537dd
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
diff --git a/share/config.fish b/share/config.fish
index d85fd1e185..c564e45b27 100644
index 73148ac25..1964e30be 100644
--- a/share/config.fish
+++ b/share/config.fish
@@ -158,6 +158,7 @@
@@ -175,6 +175,7 @@ and __fish_set_locale
 #
 if status --is-login
     if command -sq /usr/libexec/path_helper
+        and not set -q __NIX_DARWIN_SET_ENVIRONMENT_DONE
         # Adapt construct_path from the macOS /usr/libexec/path_helper
         # executable for fish; see
         # https://opensource.apple.com/source/shell_cmds/shell_cmds-203/path_helper/path_helper.c.auto.html .
         __fish_macos_set_env PATH /etc/paths '/etc/paths.d'
         if test -n "$MANPATH"
             __fish_macos_set_env MANPATH /etc/manpaths '/etc/manpaths.d'
+8 −11
Original line number Diff line number Diff line
@@ -7,7 +7,6 @@
  glibcLocales,
  gnused,
  gnugrep,
  groff,
  gawk,
  man-db,
  ninja,
@@ -152,13 +151,13 @@ let
in
stdenv.mkDerivation (finalAttrs: {
  pname = "fish";
  version = "4.1.2";
  version = "4.2.0";

  src = fetchFromGitHub {
    owner = "fish-shell";
    repo = "fish-shell";
    tag = finalAttrs.version;
    hash = "sha256-oNRC1NWYE0LEK2a/7nHtlmp20f8hn/1FZgaySqzwSbg=";
    hash = "sha256-t5whU+byERJ+nDLigJ5IznvEg3MUsVqhpGdWFzF+T4Q=";
  };

  env = {
@@ -169,7 +168,7 @@ stdenv.mkDerivation (finalAttrs: {

  cargoDeps = rustPlatform.fetchCargoVendor {
    inherit (finalAttrs) src patches;
    hash = "sha256-7mYWCHH6DBWTIJV8GPRjjf6QulwlYjwv0slablDvBF8=";
    hash = "sha256-4pDbD7hetN7wGdPr2csgVWsqtYKMj6jpYm7zBKra+bU=";
  };

  patches = [
@@ -192,13 +191,15 @@ stdenv.mkDerivation (finalAttrs: {

  # Fix FHS paths in tests
  postPatch = ''
    substituteInPlace src/builtins/tests/test_tests.rs \
    substituteInPlace src/builtins/test.rs \
      --replace-fail '"/bin/ls"' '"${lib.getExe' coreutils "ls"}"'

    substituteInPlace src/highlight/tests.rs \
    substituteInPlace src/highlight/highlight.rs \
      --replace-fail '"/bin/echo"' '"${lib.getExe' coreutils "echo"}"' \
      --replace-fail '"/bin/c"' '"${lib.getExe' coreutils "c"}"' \
      --replace-fail '"/bin/ca"' '"${lib.getExe' coreutils "ca"}"' \
      --replace-fail '"/bin/ca"' '"${lib.getExe' coreutils "ca"}"'

    substituteInPlace src/highlight/file_tester.rs \
      --replace-fail '/usr' '/'

    substituteInPlace tests/checks/cd.fish \
@@ -296,7 +297,6 @@ stdenv.mkDerivation (finalAttrs: {
    coreutils
    gnugrep
    gnused
    groff
    gettext
  ]
  ++ lib.optional (!stdenv.hostPlatform.isDarwin) man-db;
@@ -342,9 +342,6 @@ stdenv.mkDerivation (finalAttrs: {
    substituteInPlace "$out/share/fish/functions/grep.fish" \
      --replace-fail "command grep" "command ${lib.getExe gnugrep}"

    substituteInPlace "$out/share/fish/functions/__fish_print_help.fish" \
      --replace-fail "nroff" "${lib.getExe' groff "nroff"}"

    substituteInPlace $out/share/fish/completions/{sudo.fish,doas.fish} \
      --replace-fail "/usr/local/sbin /sbin /usr/sbin" ""
  ''