Unverified Commit a1ca1b10 authored by emilylange's avatar emilylange
Browse files

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.
parent 4a843da6
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
{ 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/";