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

nixos/fish: add `package` option
This commit is contained in:
Pol Dellaiera 2024-05-07 08:56:13 +02:00 committed by GitHub
commit 52b35c5833
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 4 deletions

View File

@ -694,3 +694,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)
];
}
];

View File

@ -10,6 +10,8 @@ import ./make-test-python.nix ({ pkgs, ... }: {
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 =