aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/servers/dns/ncdns/default.nix
blob: f1d124176bb44c331b048fcfae28828870e865e1 (plain)
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
{ lib, nixosTests, git, buildGoPackage, fetchFromGitHub, libcap }:

buildGoPackage rec {
  pname = "ncdns";
  version = "0.0.10.3";

  goPackagePath = "github.com/namecoin/ncdns";
  goDeps = ./deps.nix;

  src = fetchFromGitHub {
    owner = "namecoin";
    repo = "ncdns";
    rev = "v${version}";
    sha256 = "12q5al48mkjhgyk7z5wyklzzrdbcqhwxl79axa4gh9ld75prghbq";
  };

  patches = [ ./fix-tpl-path.patch ];

  buildInputs = [ libcap ];

  preBuild = ''
    go generate github.com/namecoin/x509-signature-splice/...
  '';

  postInstall = ''
    mkdir -p "$out/share"
    cp -r "$src/_doc" "$out/share/doc"
    cp -r "$src/_tpl" "$out/share/tpl"
  '';

  meta = with lib; {
    description = "Namecoin to DNS bridge daemon";
    homepage = "https://github.com/namecoin/ncdns";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ rnhmjoj ];
  };

  passthru.tests.ncdns = nixosTests.ncdns;

}