@@ -1,7 +1,8 @@
11{ stdenv, fetchurl, coreutils, utillinux,
2− nettools, bc, which, gnused, gnugrep,
2+ which, gnused, gnugrep,
33 groff, man-db, getent, libiconv, pcre2,
4− gettext, ncurses, python3
4+ gettext, ncurses, python3,
5+ cmake
56
67 , writeText
78
@@ -88,7 +89,7 @@ let
8889
8990 fish = stdenv.mkDerivation rec {
9091 name = "fish-${version}";
91− version = "2.7.1";
92+ version = "3.0.0";
9293
9394 etcConfigAppendix = builtins.toFile "etc-config.appendix.fish" etcConfigAppendixText;
9495
@@ -96,26 +97,27 @@ let
9697 # There are differences between the release tarball and the tarball github packages from the tag
9798 # Hence we cannot use fetchFromGithub
9899 url = "https://github.com/fish-shell/fish-shell/releases/download/${version}/${name}.tar.gz";
99− sha256 = "0nhc3yc5lnnan7zmxqqxm07rdpwjww5ijy45ll2njdc6fnfb2az4";
100+ sha256 = "1kzjd0n0sfslkd36lzrvvvgy3qwkd9y466bkrqlnhd5h9dhx77ga";
100101 };
101102
103+ nativeBuildInputs = [ cmake ];
102104 buildInputs = [ ncurses libiconv pcre2 ];
103105 configureFlags = [ "--without-included-pcre2" ];
104106
107+ preConfigure = ''
108+ patchShebangs ./build_tools/git_version_gen.sh
109+ '';
110+
105111 # Required binaries during execution
106112 # Python: Autocompletion generated from manpages and config editing
107113 propagatedBuildInputs = [
108− coreutils gnugrep gnused bc
114+ coreutils gnugrep gnused
109115 python3 groff gettext
110116 ] ++ optional (!stdenv.isDarwin) man-db;
111117
112118 postInstall = ''
113119 sed -r "s|command grep|command ${gnugrep}/bin/grep|" \
114120 -i "$out/share/fish/functions/grep.fish"
115− sed -e "s|bc|${bc}/bin/bc|" \
116− -e "s|/usr/bin/seq|${coreutils}/bin/seq|" \
117− -i "$out/share/fish/functions/seq.fish" \
118− "$out/share/fish/functions/math.fish"
119121 sed -i "s|which |${which}/bin/which |" \
120122 "$out/share/fish/functions/type.fish"
121123 sed -e "s|\|cut|\|${coreutils}/bin/cut|" \
@@ -147,8 +149,6 @@ let
147149 done
148150
149151 '' + optionalString (!stdenv.isDarwin) ''
150− sed -i "s|(hostname\||(${nettools}/bin/hostname\||" \
151− "$out/share/fish/functions/fish_prompt.fish"
152152 sed -i "s|Popen(\['manpath'|Popen(\['${man-db}/bin/manpath'|" \
153153 "$out/share/fish/tools/create_manpage_completions.py"
154154 sed -i "s|command manpath|command ${man-db}/bin/manpath|" \