2020-05-31 11:37:26 +00:00
|
|
|
{ stdenv, lib, buildPythonPackage, isPy3k, fetchFromGitHub, openssl }:
|
2017-12-21 19:35:32 +00:00
|
|
|
|
2022-09-08 21:35:00 +00:00
|
|
|
buildPythonPackage rec {
|
2017-12-21 19:35:32 +00:00
|
|
|
pname = "bitcoinlib";
|
2023-02-01 08:40:51 +00:00
|
|
|
version = "0.12.0";
|
2020-05-31 11:37:26 +00:00
|
|
|
|
|
|
|
disabled = !isPy3k;
|
2017-12-21 19:35:32 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2022-09-08 21:35:00 +00:00
|
|
|
owner = "petertodd";
|
|
|
|
repo = "python-bitcoinlib";
|
2022-09-08 21:34:42 +00:00
|
|
|
rev = "refs/tags/python-bitcoinlib-v${version}";
|
2023-03-03 00:48:06 +00:00
|
|
|
hash = "sha256-jguybrH86z6NWLaucQEYjvH2Gkoh3Aqh/PLZ6l8Qel4=";
|
2017-12-21 19:35:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace bitcoin/core/key.py --replace \
|
2022-09-16 09:46:02 +00:00
|
|
|
"ctypes.util.find_library('ssl.35') or ctypes.util.find_library('ssl') or 'libeay32'" \
|
2022-09-08 21:35:00 +00:00
|
|
|
"'${lib.getLib openssl}/lib/libssl${stdenv.hostPlatform.extensions.sharedLibrary}'"
|
2017-12-21 19:35:32 +00:00
|
|
|
'';
|
|
|
|
|
2022-09-08 21:35:00 +00:00
|
|
|
pythonImportsCheck = [ "bitcoin" "bitcoin.core.key" ];
|
|
|
|
|
2022-09-08 21:35:00 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/petertodd/python-bitcoinlib";
|
2017-12-21 19:35:32 +00:00
|
|
|
description = "Easy interface to the Bitcoin data structures and protocol";
|
2022-09-08 21:35:00 +00:00
|
|
|
changelog = "https://github.com/petertodd/python-bitcoinlib/raw/${src.rev}/release-notes.md";
|
|
|
|
license = with licenses; [ lgpl3Plus ];
|
|
|
|
maintainers = with maintainers; [ jb55 ];
|
2017-12-21 19:35:32 +00:00
|
|
|
};
|
|
|
|
}
|