dnscontrol: install shell completions
DNSControl has built-in shell completions as described in [1]. They can be installed on disk and will be loaded by bash-completion or zsh. [1]: https://docs.dnscontrol.org/getting-started/getting-started#id-1.1.-shell-completion
This commit is contained in:
parent
65949ff1c8
commit
9aeb7ee069
@ -1,4 +1,4 @@
|
||||
{ lib, buildGoModule, fetchFromGitHub, testers, dnscontrol }:
|
||||
{ lib, buildGoModule, fetchFromGitHub, installShellFiles, testers, dnscontrol }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "dnscontrol";
|
||||
@ -13,10 +13,18 @@ buildGoModule rec {
|
||||
|
||||
vendorHash = "sha256-kmnV1W0HGlxFZYYUeUd9D/zOabUhM5kDoTZTnRYJ2sM=";
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
subPackages = [ "." ];
|
||||
|
||||
ldflags = [ "-s" "-w" "-X=main.version=${version}" ];
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --cmd dnscontrol \
|
||||
--bash <($out/bin/dnscontrol shell-completion bash) \
|
||||
--zsh <($out/bin/dnscontrol shell-completion zsh)
|
||||
'';
|
||||
|
||||
preCheck = ''
|
||||
# requires network
|
||||
rm pkg/spflib/flatten_test.go pkg/spflib/parse_test.go
|
||||
|
Loading…
Reference in New Issue
Block a user