Skip to content

Commit

Permalink
zsh-abbr: a newer installPhase approach
Browse files Browse the repository at this point in the history
  • Loading branch information
Icy-Thought committed Oct 18, 2024
1 parent b1ea4a3 commit d90af14
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 d90af14

Please sign in to comment.