diff options
author | Pol Dellaiera <pol.dellaiera@protonmail.com> | 2024-05-07 08:56:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-07 08:56:13 +0200 |
commit | 52b35c58330678dc5d360296087dc007aa46c239 (patch) | |
tree | ae8e102707096f426642d9c72f2ce71125befb8e /nixos | |
parent | 219a17302657b03d87e8fba06a6a67901bacf281 (diff) | |
parent | f959fd3fff605950d39fc0e71d6f3bcc303f11b3 (diff) |
Merge pull request #309534 from getchoo/nixos/fish/package-option
nixos/fish: add `package` option
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/doc/manual/release-notes/rl-2405.section.md | 2 | ||||
-rw-r--r-- | nixos/modules/programs/fish.nix | 10 | ||||
-rw-r--r-- | nixos/tests/fish.nix | 2 |
3 files changed, 10 insertions, 4 deletions
diff --git a/nixos/doc/manual/release-notes/rl-2405.section.md b/nixos/doc/manual/release-notes/rl-2405.section.md index e545bda2fba3..323277420229 100644 --- a/nixos/doc/manual/release-notes/rl-2405.section.md +++ b/nixos/doc/manual/release-notes/rl-2405.section.md @@ -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 diff --git a/nixos/modules/programs/fish.nix b/nixos/modules/programs/fish.nix index 2102a07cd0bc..ebc16f6ff012 100644 --- a/nixos/modules/programs/fish.nix +++ b/nixos/modules/programs/fish.nix @@ -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) ]; } ]; diff --git a/nixos/tests/fish.nix b/nixos/tests/fish.nix index 3d9b13c6af70..c9a1bef51478 100644 --- a/nixos/tests/fish.nix +++ b/nixos/tests/fish.nix @@ -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 = |