2020-05-31 12:37:26 +01:00
|
|
|
{ stdenv, lib, buildPythonPackage, isPy3k, fetchFromGitHub, openssl }:
|
2017-12-21 19:35:32 +00:00
|
|
|
|
2017-12-24 05:15:58 +00:00
|
|
|
let ext = if stdenv.isDarwin then "dylib" else "so";
|
|
|
|
in buildPythonPackage rec {
|
2017-12-21 19:35:32 +00:00
|
|
|
pname = "bitcoinlib";
|
2020-05-31 12:37:26 +01:00
|
|
|
version = "0.11.0";
|
|
|
|
|
|
|
|
disabled = !isPy3k;
|
2017-12-21 19:35:32 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "petertodd";
|
|
|
|
repo = "python-bitcoinlib";
|
2020-05-31 12:37:26 +01:00
|
|
|
rev = "python-${pname}-v${version}";
|
|
|
|
sha256 = "0pwypd966zzivb37fvg4l6yr7ihplqnr1jwz9zm3biip7x89bdzm";
|
2017-12-21 19:35:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace bitcoin/core/key.py --replace \
|
|
|
|
"ctypes.util.find_library('ssl') or 'libeay32'" \
|
2017-12-24 05:15:58 +00:00
|
|
|
"'${openssl.out}/lib/libssl.${ext}'"
|
2017-12-21 19:35:32 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = src.meta.homepage;
|
|
|
|
description = "Easy interface to the Bitcoin data structures and protocol";
|
2020-05-31 12:37:26 +01:00
|
|
|
license = with lib.licenses; [ lgpl3 ];
|
2017-12-21 19:35:32 +00:00
|
|
|
maintainers = with lib.maintainers; [ jb55 ];
|
|
|
|
};
|
|
|
|
}
|