about summary refs log tree commit diff
path: root/pkgs/applications/networking
diff options
context:
space:
mode:
authorLeona Maroni <dev@leona.is>2024-03-15 15:42:29 +0100
committerGitHub <noreply@github.com>2024-03-15 15:42:29 +0100
commitc5bada18b766b30d528924eb84ce3d2f85e2dd8e (patch)
treeeec56b76fbb9f540ae3d2e73fa8aafd9af07292f /pkgs/applications/networking
parent6f197ab1e76ab6fde4639385ae430be504d7d355 (diff)
parenta1ca1b10ab18687dd2f3eca1bff2afb4c5cb25bb (diff)
downloadnixlib-c5bada18b766b30d528924eb84ce3d2f85e2dd8e.tar
nixlib-c5bada18b766b30d528924eb84ce3d2f85e2dd8e.tar.gz
nixlib-c5bada18b766b30d528924eb84ce3d2f85e2dd8e.tar.bz2
nixlib-c5bada18b766b30d528924eb84ce3d2f85e2dd8e.tar.lz
nixlib-c5bada18b766b30d528924eb84ce3d2f85e2dd8e.tar.xz
nixlib-c5bada18b766b30d528924eb84ce3d2f85e2dd8e.tar.zst
nixlib-c5bada18b766b30d528924eb84ce3d2f85e2dd8e.zip
Merge pull request #293375 from emilylange/dnscontrol-version-reporting
dnscontrol: fix version reporting (again), add version test to `passthru.tests`
Diffstat (limited to 'pkgs/applications/networking')
-rw-r--r--pkgs/applications/networking/dnscontrol/default.nix11
1 files changed, 9 insertions, 2 deletions
diff --git a/pkgs/applications/networking/dnscontrol/default.nix b/pkgs/applications/networking/dnscontrol/default.nix
index ae4fc0a4e3b7..fc2c33e292cf 100644
--- a/pkgs/applications/networking/dnscontrol/default.nix
+++ b/pkgs/applications/networking/dnscontrol/default.nix
@@ -1,4 +1,4 @@
-{ lib, buildGoModule, fetchFromGitHub }:
+{ lib, buildGoModule, fetchFromGitHub, testers, dnscontrol }:
 
 buildGoModule rec {
   pname = "dnscontrol";
@@ -15,13 +15,20 @@ buildGoModule rec {
 
   subPackages = [ "." ];
 
-  ldflags = [ "-s" "-w" "-X=main.Version=${version}" ];
+  ldflags = [ "-s" "-w" "-X=main.version=${version}" ];
 
   preCheck = ''
     # requires network
     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; {
     description = "Synchronize your DNS to multiple providers from a simple DSL";
     homepage = "https://dnscontrol.org/";