git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #147459 from samueldr/fix/nix-bash-completion-2.4

Fix bash completion for stable nix-* commands with Nix 2.4

commit6f4eab2bd1a8d6511cc4b0274dbd2d6764694abe authorThiago Kenji Okada <thiagokokada@gmail.com> dateFri 26 Nov 2021, 10:32 (5 years ago) parentdf610cc8608d39
2 files changed+3−1
nixos/modules/services/misc/nix-daemon.nix+1−1 pkgs/shells/bash/nix-bash-completions/default.nix+2
nixos/modules/services/misc/nix-daemon.nix+1−1
@@ -546,7 +546,7 @@ in
546546 [ nix
547547 pkgs.nix-info
548548 ]
549− ++ optional (config.programs.bash.enableCompletion && !versionAtLeast nixVersion "2.4pre") pkgs.nix-bash-completions;
549+ ++ optional (config.programs.bash.enableCompletion) pkgs.nix-bash-completions;
550550
551551 environment.etc."nix/nix.conf".source = nixConf;
552552
pkgs/shells/bash/nix-bash-completions/default.nix+2
@@ -32,5 +32,7 @@ stdenv.mkDerivation rec {
3232 license = licenses.bsd3;
3333 platforms = platforms.all;
3434 maintainers = with maintainers; [ hedning ];
35+ # Set a lower priority such that the newly provided completion from Nix 2.4 are preferred.
36+ priority = 10;
3537 };
3638}