mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-26 18:24:53 +00:00
coreutils 9.10 man pages are generated by help2man 1.50 which embeds tty hyperlink escape codes (\X'tty: link ...'). These break fish's create_manpage_completions.py parser, so coreutils.fish is no longer generated. Switch to coreutils-full (the minimal coreutils has no man pages at all) and check for chmod.fish which still parses successfully.
37 lines
1.2 KiB
Nix
37 lines
1.2 KiB
Nix
{
|
|
name = "fish";
|
|
|
|
nodes.machine =
|
|
{ pkgs, ... }:
|
|
|
|
{
|
|
programs.fish.enable = true;
|
|
environment.systemPackages = with pkgs; [
|
|
# coreutils-full (not coreutils) so that man pages are available
|
|
# for completion generation
|
|
coreutils-full
|
|
procps # kill collides with coreutils' to test https://github.com/NixOS/nixpkgs/issues/56432
|
|
];
|
|
|
|
# Avoid slow man cache build
|
|
documentation.man.enable = false;
|
|
};
|
|
|
|
testScript =
|
|
#python
|
|
''
|
|
start_all()
|
|
machine.wait_for_file("/etc/fish/generated_completions/chmod.fish")
|
|
machine.wait_for_file("/etc/fish/generated_completions/kill.fish")
|
|
machine.succeed(
|
|
"fish -ic 'echo $fish_complete_path' | grep -q '/share/fish/vendor_completions.d /etc/fish/generated_completions /root/.cache/fish/generated_completions$'"
|
|
)
|
|
machine.wait_for_file("/etc/fish/nixos-env-preinit.fish")
|
|
machine.succeed(
|
|
"env -u __NIXOS_SET_ENVIRONMENT_DONE fish -lc 'set -q __NIXOS_SET_ENVIRONMENT_DONE'"
|
|
)
|
|
machine.wait_for_file("/etc/fish/config.fish")
|
|
config = machine.succeed("fish_indent -c /etc/fish/config.fish")
|
|
'';
|
|
}
|