about summary refs log tree commit diff
path: root/pkgs/applications/blockchains/dcrd.nix
blob: 16d39e85da153863f8581704a28cf8395c7fc0a3 (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
{ stdenv, lib, go, buildGoPackage, dep, fetchgit, git, cacert }:

buildGoPackage rec {
  pname = "dcrd";
  version = "1.1.2";
  rev = "refs/tags/v${version}";
  goPackagePath = "github.com/decred/dcrd";

  buildInputs = [ go git dep cacert ];

  GIT_SSL_CAINFO = "${cacert}/etc/ssl/certs/ca-bundle.crt";
  NIX_SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";

  src = fetchgit {
    inherit rev;
    url = "https://${goPackagePath}";
    sha256 = "0xcynipdn9zmmralxj0hjrwyanvhkwfj2b1vvjk5zfc95s2xc1q9";
  };

  preBuild = ''
    export CWD=$(pwd)
    cd go/src/github.com/decred/dcrd
    dep ensure
    go install . ./cmd/...
    cd $CWD
  '';

  meta = {
    homepage = "https://decred.org";
    description = "Decred daemon in Go (golang)";
    license = with lib.licenses; [ isc ];
    broken = stdenv.isLinux; # 2018-04-10
  };
}