blob: b6bbe1917e42a5906e6cd96bba31170cf16d3b36 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles, testers, dnscontrol }:
buildGoModule rec {
pname = "dnscontrol";
version = "4.12.3";
src = fetchFromGitHub {
owner = "StackExchange";
repo = "dnscontrol";
rev = "v${version}";
hash = "sha256-861WEzUc2tVa4HcX5E5KsXcLsX4EgINiC/s+r8ZsCAI=";
};
vendorHash = "sha256-+JGYntDnFdGN7YfYstbssIXdLn16/Rx0jzbYT646DTY=";
nativeBuildInputs = [ installShellFiles ];
subPackages = [ "." ];
ldflags = [ "-s" "-w" "-X=main.version=${version}" ];
postInstall = ''
installShellCompletion --cmd dnscontrol \
--bash <($out/bin/dnscontrol shell-completion bash) \
--zsh <($out/bin/dnscontrol shell-completion zsh)
'';
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/";
changelog = "https://github.com/StackExchange/dnscontrol/releases/tag/${src.rev}";
license = licenses.mit;
maintainers = with maintainers; [ SuperSandro2000 ];
mainProgram = "dnscontrol";
};
}
|