nixos/fish: add package option

This commit is contained in:
seth 2024-05-06 06:53:41 -04:00
parent 47709b6fb2
commit 3056f09554
No known key found for this signature in database
GPG key ID: D31BD0D494BBEE86
2 changed files with 8 additions and 4 deletions

View file

@ -691,3 +691,5 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
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

View file

@ -55,6 +55,8 @@ in
type = types.bool;
};
package = mkPackageOption pkgs "fish" { };
useBabelfish = mkOption {
type = types.bool;
default = false;
@ -244,8 +246,8 @@ in
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 = ".";
@ -287,12 +289,12 @@ in
++ 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)
];
}
];