desync: add shell completion
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
installShellFiles,
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
@@ -17,9 +19,18 @@ buildGoModule rec {
|
||||
|
||||
vendorHash = "sha256-CBw5FFGQgvdYoOUZ6E1F/mxqzNKOwh2IZbsh0dAsLEE=";
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
# nix builder doesn't have access to test data; tests fail for reasons unrelated to binary being bad.
|
||||
doCheck = false;
|
||||
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd desync \
|
||||
--bash <($out/bin/desync completion bash) \
|
||||
--fish <($out/bin/desync completion fish) \
|
||||
--zsh <($out/bin/desync completion zsh)
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Content-addressed binary distribution system";
|
||||
mainProgram = "desync";
|
||||
|
||||
Reference in New Issue
Block a user