Merge pull request #146030 from antifuchs/nix-zsh-completions-with-fewer-hacks
This commit is contained in:
commit
f40b4789e4
2 changed files with 3 additions and 15 deletions
|
@ -283,21 +283,8 @@ in
|
|||
# see https://github.com/NixOS/nixpkgs/issues/132732
|
||||
environment.etc.zinputrc.text = builtins.readFile ./zinputrc;
|
||||
|
||||
environment.systemPackages =
|
||||
let
|
||||
completions =
|
||||
if lib.versionAtLeast (lib.getVersion config.nix.package) "2.4pre"
|
||||
then
|
||||
pkgs.nix-zsh-completions.overrideAttrs
|
||||
(_: {
|
||||
postInstall = ''
|
||||
rm $out/share/zsh/site-functions/_nix
|
||||
'';
|
||||
})
|
||||
else pkgs.nix-zsh-completions;
|
||||
in
|
||||
[ pkgs.zsh ]
|
||||
++ optional cfg.enableCompletion completions;
|
||||
environment.systemPackages = [ pkgs.zsh ]
|
||||
++ optional cfg.enableCompletion pkgs.nix-zsh-completions;
|
||||
|
||||
environment.pathsToLink = optional cfg.enableCompletion "/share/zsh";
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@ stdenv.mkDerivation rec {
|
|||
meta = with lib; {
|
||||
homepage = "https://github.com/spwhitt/nix-zsh-completions";
|
||||
description = "ZSH completions for Nix, NixOS, and NixOps";
|
||||
priority = 6; # prevent collisions with nix 2.4's built-in completions
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ spwhitt olejorgenb hedning ma27 ];
|
||||
|
|
Loading…
Reference in a new issue