2020-07-18 16:06:22 +00:00
|
|
|
{ stdenv, lib, buildPythonPackage, isPy3k, fetchFromGitHub, openssl }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
buildPythonPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "bitcoinlib";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "0.12.0";
|
2020-07-18 16:06:22 +00:00
|
|
|
|
|
|
|
disabled = !isPy3k;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2022-09-09 14:08:57 +00:00
|
|
|
owner = "petertodd";
|
|
|
|
repo = "python-bitcoinlib";
|
|
|
|
rev = "refs/tags/python-bitcoinlib-v${version}";
|
2023-02-02 18:25:31 +00:00
|
|
|
sha256 = "sha256-jguybrH86z6NWLaucQEYjvH2Gkoh3Aqh/PLZ6l8Qel4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace bitcoin/core/key.py --replace \
|
2022-09-22 12:36:57 +00:00
|
|
|
"ctypes.util.find_library('ssl.35') or ctypes.util.find_library('ssl') or 'libeay32'" \
|
2022-09-09 14:08:57 +00:00
|
|
|
"'${lib.getLib openssl}/lib/libssl${stdenv.hostPlatform.extensions.sharedLibrary}'"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
pythonImportsCheck = [ "bitcoin" "bitcoin.core.key" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/petertodd/python-bitcoinlib";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Easy interface to the Bitcoin data structures and protocol";
|
2022-09-09 14:08:57 +00:00
|
|
|
changelog = "https://github.com/petertodd/python-bitcoinlib/raw/${src.rev}/release-notes.md";
|
|
|
|
license = with licenses; [ lgpl3Plus ];
|
|
|
|
maintainers = with maintainers; [ jb55 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|