Merge pull request #293375 from emilylange/dnscontrol-version-reporting

dnscontrol: fix version reporting (again), add version test to `passthru.tests`
This commit is contained in:
Leona Maroni
2024-03-15 15:42:29 +01:00
committed by GitHub

View File

@@ -1,4 +1,4 @@
{ lib, buildGoModule, fetchFromGitHub }: { lib, buildGoModule, fetchFromGitHub, testers, dnscontrol }:
buildGoModule rec { buildGoModule rec {
pname = "dnscontrol"; pname = "dnscontrol";
@@ -15,13 +15,20 @@ buildGoModule rec {
subPackages = [ "." ]; subPackages = [ "." ];
ldflags = [ "-s" "-w" "-X=main.Version=${version}" ]; ldflags = [ "-s" "-w" "-X=main.version=${version}" ];
preCheck = '' preCheck = ''
# requires network # requires network
rm pkg/spflib/flatten_test.go pkg/spflib/parse_test.go rm pkg/spflib/flatten_test.go pkg/spflib/parse_test.go
''; '';
passthru.tests = {
version = testers.testVersion {
command = "${lib.getExe dnscontrol} version";
package = dnscontrol;
};
};
meta = with lib; { meta = with lib; {
description = "Synchronize your DNS to multiple providers from a simple DSL"; description = "Synchronize your DNS to multiple providers from a simple DSL";
homepage = "https://dnscontrol.org/"; homepage = "https://dnscontrol.org/";