Merge pull request #317432 from Maetveis/master

This commit is contained in:
Sandro 2024-06-05 15:49:46 +02:00 committed by GitHub
commit f9b3e2b462
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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