keepassxc-go: only generate shell completions if possible

This commit is contained in:
Stefan Frijters
2024-07-08 11:37:43 +02:00
parent f32a8ac989
commit 91ac44bb0d
+2 -1
View File
@@ -1,4 +1,5 @@
{ lib
, stdenv
, buildGoModule
, fetchFromGitHub
, installShellFiles
@@ -19,7 +20,7 @@ buildGoModule rec {
vendorHash = "sha256-jscyNyVr+RDN1EaxIOc3aYCAVT+1eO/c+dxEsIorDIs=";
postInstall = ''
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
local INSTALL="$out/bin/keepassxc-go"
installShellCompletion --cmd keepassxc-go \
--bash <($out/bin/keepassxc-go completion bash) \