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.
This commit is contained in:
emilylange 2024-03-05 01:58:28 +01:00
parent 4a843da662
commit a1ca1b10ab
No known key found for this signature in database
GPG Key ID: 0AD773CE46FD0F87

View File

@ -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/";