From a1ca1b10ab18687dd2f3eca1bff2afb4c5cb25bb Mon Sep 17 00:00:00 2001 From: emilylange Date: Tue, 5 Mar 2024 01:58:28 +0100 Subject: [PATCH] dnscontrol: add version test to `passthru.tests` dnscontrol's version reporting had to be fixed twice since its addition to nixpkgs. This simple version test based on `testers.testVersion` should be able to prevent it from going unnoticed again. --- pkgs/applications/networking/dnscontrol/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/dnscontrol/default.nix b/pkgs/applications/networking/dnscontrol/default.nix index 911d96212b1b..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"; @@ -22,6 +22,13 @@ buildGoModule rec { 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/";