_1password: fixup packaging

installPhase was missing a preInstall hook, and concatMapStrings is too
fancy for such a small thing.
This commit is contained in:
Cole Helbling 2022-03-29 16:31:17 -07:00
parent 90e8d66633
commit 889fd0ca40

View file

@ -42,12 +42,17 @@ stdenv.mkDerivation {
'';
installPhase = ''
runHook preInstall
install -D ${mainProgram} $out/bin/${mainProgram}
runHook postInstall
'';
postInstall = "installShellCompletion --cmd ${mainProgram}" + lib.concatMapStrings
(s: " --${s} <($out/bin/${mainProgram} completion ${s})") [ "bash" "fish" "zsh" ];
postInstall = ''
installShellCompletion --cmd ${mainProgram} \
--bash <($out/bin/${mainProgram} completion bash) \
--fish <($out/bin/${mainProgram} completion fish) \
--zsh <($out/bin/${mainProgram} completion zsh)
'';
dontStrip = stdenv.isDarwin;