···
···
hash = "sha256-BLbL5Tj3FQQCOeX5TWXMaxCpvdzZtKe5dDQi66uU/BM=";
160
-
env.FISH_BUILD_VERSION = finalAttrs.version;
162
+
FISH_BUILD_VERSION = finalAttrs.version;
163
+
# Skip tests that are known to be flaky in CI
cargoDeps = rustPlatform.fetchCargoVendor {
inherit (finalAttrs) src;
···
sed -i 's|"/bin/c"|"${lib.getExe' coreutils "c"}"|' src/tests/highlight.rs
sed -i 's|"/bin/ca"|"${lib.getExe' coreutils "ca"}"|' src/tests/highlight.rs
193
-
sed -i 's|/usr|/build|' src/tests/highlight.rs
198
+
sed -i 's|/usr|/|' src/tests/highlight.rs
196
-
sed -i 's|/bin/pwd|${coreutils}/bin/pwd|' tests/checks/cd.fish
201
+
sed -i 's|/bin/pwd|${lib.getExe' coreutils "pwd"}|' tests/checks/cd.fish
# tests/checks/redirect.fish
199
-
sed -i 's|/bin/echo|${coreutils}/bin/echo|' tests/checks/redirect.fish
204
+
sed -i 's|/bin/echo|${lib.getExe' coreutils "echo"}|' tests/checks/redirect.fish
# tests/checks/vars_as_commands.fish
sed -i 's|/usr/bin|${coreutils}/bin|' tests/checks/vars_as_commands.fish
205
-
sed -i 's|ps -o stat|${procps}/bin/ps -o stat|' tests/checks/jobs.fish
206
-
sed -i 's|/bin/echo|${coreutils}/bin/echo|' tests/checks/jobs.fish
210
+
sed -i 's|ps -o stat|${lib.getExe' procps "ps"} -o stat|' tests/checks/jobs.fish
211
+
sed -i 's|/bin/echo|${lib.getExe' coreutils "echo"}|' tests/checks/jobs.fish
# tests/checks/job-control-noninteractive.fish
209
-
sed -i 's|/bin/echo|${coreutils}/bin/echo|' tests/checks/job-control-noninteractive.fish
214
+
sed -i 's|/bin/echo|${lib.getExe' coreutils "echo"}|' tests/checks/job-control-noninteractive.fish
# tests/checks/complete.fish
217
+
sed -i 's|/bin/ls|${lib.getExe' coreutils "ls"}|' tests/checks/complete.fish
sed -i 's|/bin/ls|${coreutils}/bin/ls|' tests/checks/complete.fish
221
+
# pexpect tests are flaky
222
+
# See https://github.com/fish-shell/fish-shell/issues/8789
223
+
rm tests/pexpects/exit_handlers.py
224
+
rm tests/pexpects/private_mode.py
225
+
rm tests/pexpects/history.py
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
# Tests use pkill/pgrep which are currently not built on Darwin
# See https://github.com/NixOS/nixpkgs/pull/103180
230
+
# and https://github.com/NixOS/nixpkgs/issues/141157
rm tests/pexpects/exit.py
rm tests/pexpects/job_summary.py
rm tests/pexpects/signals.py
221
-
# pexpect tests are flaky in general
222
-
# See https://github.com/fish-shell/fish-shell/issues/8789
223
-
rm tests/pexpects/bind.py
234
+
rm tests/pexpects/fg.py
225
-
+ lib.optionalString stdenv.hostPlatform.isLinux ''
226
-
# pexpect tests are flaky on aarch64-linux (also x86_64-linux)
227
-
# See https://github.com/fish-shell/fish-shell/issues/8789
228
-
rm tests/pexpects/exit_handlers.py
236
+
+ lib.optionalString stdenv.hostPlatform.isAarch64 ''
237
+
# This test seems to consistently fail on aarch64
238
+
rm tests/checks/cd.fish
···
289
-
nativeCheckInputs = [
292
-
(python3.withPackages (ps: [ ps.pexpect ]))
299
+
nativeCheckInputs =
303
+
(python3.withPackages (ps: [ ps.pexpect ]))
306
+
++ lib.optionals stdenv.hostPlatform.isDarwin [
307
+
# For the getconf command, used in default-setup-path.fish
checkTarget = "fish_run_tests";
···
319
-
sed -r "s|command grep|command ${gnugrep}/bin/grep|" \
334
+
sed -r "s|command grep|command ${lib.getExe gnugrep}|" \
-i "$out/share/fish/functions/grep.fish"
321
-
sed -e "s|\|cut|\|${coreutils}/bin/cut|" \
336
+
sed -e "s|\|cut|\|${lib.getExe' coreutils "cut"}|" \
-i "$out/share/fish/functions/fish_prompt.fish"
323
-
sed -e "s|uname|${coreutils}/bin/uname|" \
338
+
sed -e "s|uname|${lib.getExe' coreutils "uname"}|" \
-i "$out/share/fish/functions/__fish_pwd.fish" \
"$out/share/fish/functions/prompt_pwd.fish"
326
-
sed -e "s|sed |${gnused}/bin/sed |" \
341
+
sed -e "s|sed |${lib.getExe gnused} |" \
-i "$out/share/fish/functions/alias.fish" \
"$out/share/fish/functions/prompt_pwd.fish"
329
-
sed -i "s|nroff|${groff}/bin/nroff|" \
344
+
sed -i "s|nroff|${lib.getExe' groff "nroff"}|" \
"$out/share/fish/functions/__fish_print_help.fish"
sed -i "s|/usr/local/sbin /sbin /usr/sbin||" \
$out/share/fish/completions/{sudo.fish,doas.fish}
333
-
sed -e "s| awk | ${gawk}/bin/awk |" \
348
+
sed -e "s| awk | ${lib.getExe' gawk "awk"} |" \
-i $out/share/fish/functions/{__fish_print_packages.fish,__fish_print_addresses.fish,__fish_describe_command.fish,__fish_complete_man.fish,__fish_complete_convert_options.fish} \
$out/share/fish/completions/{cwebp,adb,ezjail-admin,grunt,helm,heroku,lsusb,make,p4,psql,rmmod,vim-addons}.fish
···
+ lib.optionalString stdenv.hostPlatform.isLinux ''
for cur in $out/share/fish/functions/*.fish; do
349
-
sed -e "s|/usr/bin/getent|${getent}/bin/getent|" \
364
+
sed -e "s|/usr/bin/getent|${lib.getExe getent}|" \
+ lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
355
-
sed -i "s|Popen(\['manpath'|Popen(\['${man-db}/bin/manpath'|" \
370
+
sed -i "s|Popen(\['manpath'|Popen(\['${lib.getExe' man-db "manpath"}'|" \
"$out/share/fish/tools/create_manpage_completions.py"
357
-
sed -i "s|command manpath|command ${man-db}/bin/manpath|" \
372
+
sed -i "s|command manpath|command ${lib.getExe' man-db "manpath"}|" \
"$out/share/fish/functions/man.fish"
+ lib.optionalString useOperatingSystemEtc ''