summary refs log tree commit diff
path: root/pkgs/tools/misc/libbitcoin/libbitcoin.nix
blob: 61c462f7853f166b9e6d9d85fe7812085e554ef5 (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
{ stdenv, lib, fetchurl, pkgconfig, autoreconfHook
, boost, libsodium, czmqpp, secp256k1 }:

let
  pname = "libbitcoin";
  version = "2.11.0";

in stdenv.mkDerivation {
  name = "${pname}-${version}";

  src = fetchurl {
    url = "https://github.com/libbitcoin/libbitcoin/archive/v${version}.tar.gz";
    sha256 = "1lpdjm13kgs4fbp579bwfvws8yf9mnr5dw3ph8zxg2gf110h85sy";
  };

  buildInputs = [ autoreconfHook pkgconfig ];

  propagatedBuildInputs = [ secp256k1 ];

  configureFlags = [
    "--with-boost=${boost.dev}"
    "--with-boost-libdir=${boost.out}/lib"
  ];

  meta = with stdenv.lib; {
    description = "C++ library for building bitcoin applications";
    homepage = https://libbitcoin.org/;
    platforms = platforms.linux ++ platforms.darwin;
    maintainers = with maintainers; [ chris-martin ];

    # https://wiki.unsystem.net/en/index.php/Libbitcoin/License
    # AGPL with an additional clause
    license = licenses.agpl3;
  };
}