Unverified Commit c5bada18 authored by Leona Maroni's avatar Leona Maroni Committed by GitHub
Browse files

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

dnscontrol: fix version reporting (again), add version test to `passthru.tests`
parents 6f197ab1 a1ca1b10
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
{ 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/";