1 { stdenv, lib, buildPythonPackage, isPy3k, fetchFromGitHub, openssl }:
3 let ext = if stdenv.isDarwin then "dylib" else "so";
4 in buildPythonPackage rec {
10 src = fetchFromGitHub {
12 repo = "python-bitcoinlib";
13 rev = "python-${pname}-v${version}";
14 sha256 = "0pwypd966zzivb37fvg4l6yr7ihplqnr1jwz9zm3biip7x89bdzm";
18 substituteInPlace bitcoin/core/key.py --replace \
19 "ctypes.util.find_library('ssl') or 'libeay32'" \
20 "'${openssl.out}/lib/libssl.${ext}'"
24 homepage = src.meta.homepage;
25 description = "Easy interface to the Bitcoin data structures and protocol";
26 license = with lib.licenses; [ lgpl3 ];
27 maintainers = with lib.maintainers; [ jb55 ];