Merge pull request #309534 from getchoo/nixos/fish/package-option

nixos/fish: add `package` option

Changed files
+10 -4
nixos
doc
manual
release-notes
modules
programs
tests
+2
nixos/doc/manual/release-notes/rl-2405.section.md
···
This enables mandoc to find manual pages in Nix profiles. To set the manual search paths via the `mandoc.conf` configuration file like before, use `documentation.man.mandoc.settings.manpath` instead.
- `grafana-loki` package was updated to 3.0.0 which includes [breaking changes](https://github.com/grafana/loki/releases/tag/v3.0.0)
+
+
- `programs.fish.package` now allows you to override the package used in the `fish` module
+6 -4
nixos/modules/programs/fish.nix
···
type = types.bool;
};
+
package = mkPackageOption pkgs "fish" { };
+
useBabelfish = mkOption {
type = types.bool;
default = false;
···
patchedGenerator = pkgs.stdenv.mkDerivation {
name = "fish_patched-completion-generator";
srcs = [
-
"${pkgs.fish}/share/fish/tools/create_manpage_completions.py"
-
"${pkgs.fish}/share/fish/tools/deroff.py"
+
"${cfg.package}/share/fish/tools/create_manpage_completions.py"
+
"${cfg.package}/share/fish/tools/deroff.py"
];
unpackCmd = "cp $curSrc $(basename $curSrc)";
sourceRoot = ".";
···
++ optional cfg.vendor.functions.enable "/share/fish/vendor_functions.d";
}
-
{ systemPackages = [ pkgs.fish ]; }
+
{ systemPackages = [ cfg.package ]; }
{
shells = [
"/run/current-system/sw/bin/fish"
-
"${pkgs.fish}/bin/fish"
+
(lib.getExe cfg.package)
];
}
];
+2
nixos/tests/fish.nix
···
coreutils
procps # kill collides with coreutils' to test https://github.com/NixOS/nixpkgs/issues/56432
];
+
# TODO: remove if/when #267880 is merged and this is a default
+
services.logrotate.enable = false;
};
testScript =