Skip to content

Commit

Permalink
zsh-abbr: adding completions + removing redudant bin directory (NixOS…
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksanaa authored Oct 29, 2024
2 parents 0dad0e5 + d90af14 commit 73a23a5
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions pkgs/shells/zsh/zsh-abbr/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
stdenv,
lib,
fetchFromGitHub,
installShellFiles,
}:
stdenv.mkDerivation rec {
pname = "zsh-abbr";
Expand All @@ -15,12 +16,18 @@ stdenv.mkDerivation rec {
};

strictDeps = true;
nativeBuildInputs = [ installShellFiles ];

installPhase = ''
install -D zsh-abbr.zsh $out/share/zsh/${pname}/abbr.plugin.zsh
# Needed so that `man` can find the manpage, since it looks via PATH
mkdir -p $out/bin
mv man $out/share/man
runHook preInstall
install zsh-abbr.plugin.zsh zsh-abbr.zsh -Dt $out/share/zsh/zsh-abbr/
install completions/_abbr -Dt $out/share/zsh/zsh-abbr/completions/
# Required for `man` to find the manpage of abbr, since it looks via PATH
installManPage man/man1/*
runHook postInstall
'';

meta = with lib; {
Expand Down

0 comments on commit 73a23a5

Please sign in to comment.