0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

[Backport release-24.11] wormhole-william: install shell completions (#363127)

This commit is contained in:
Aleksana 2024-12-08 17:31:33 +08:00 committed by GitHub
commit a772e2972b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,4 +1,4 @@
{ lib, buildGoModule, fetchFromGitHub }:
{ lib, stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "wormhole-william";
@ -22,6 +22,15 @@ buildGoModule rec {
"SkipWormholeDirectoryTransportSendRecvDirect"
'';
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd wormhole-william \
--bash <($out/bin/wormhole-william shell-completion bash) \
--fish <($out/bin/wormhole-william shell-completion fish) \
--zsh <($out/bin/wormhole-william shell-completion zsh)
'';
meta = with lib; {
homepage = "https://github.com/psanford/wormhole-william";
description = "End-to-end encrypted file transfers";