nix-bitcoin/pkgs/python-packages/python-bitcointx/default.nix
2023-12-14 15:00:28 +01:00

27 lines
840 B
Nix

{ lib, buildPythonPackageWithDepsCheck, fetchFromGitHub, secp256k1 }:
buildPythonPackageWithDepsCheck rec {
pname = "python-bitcointx";
version = "1.1.4";
src = fetchFromGitHub {
owner = "Simplexum";
repo = "python-bitcointx";
rev = "python-bitcointx-v${version}";
hash = "sha256-y8/cyLQr3GbpYqCg8LKTfyL0OX7eIo5AxjdFTWTqHmk=";
};
patchPhase = ''
for path in core/secp256k1.py tests/test_load_secp256k1.py; do
substituteInPlace "bitcointx/$path" \
--replace "ctypes.util.find_library('secp256k1')" "'${secp256k1}/lib/libsecp256k1.so'"
done
'';
meta = with lib; {
description = "Interface to Bitcoin transaction data structures";
homepage = "https://github.com/Simplexum/python-bitcointx";
maintainers = with maintainers; [ nixbitcoin ];
license = licenses.gpl3;
};
}