2020-07-15 09:37:34 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2020-10-02 20:19:23 +00:00
|
|
|
, fetchFromGitHub
|
2020-08-15 22:43:16 +00:00
|
|
|
, pythonOlder
|
2020-07-15 09:37:34 +00:00
|
|
|
, ecdsa
|
2022-07-12 14:06:32 +00:00
|
|
|
, coincurve
|
|
|
|
, pynacl
|
|
|
|
, crcmod
|
|
|
|
, ed25519-blake2b
|
|
|
|
, py-sr25519-bindings
|
|
|
|
, cbor2
|
|
|
|
, pycryptodome
|
2020-07-15 09:37:34 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2023-01-31 10:29:33 +00:00
|
|
|
pname = "bip-utils";
|
2022-07-12 14:06:32 +00:00
|
|
|
version = "2.7.0";
|
2023-01-31 10:29:33 +00:00
|
|
|
format = "setuptools";
|
2020-07-15 09:37:34 +00:00
|
|
|
|
2020-08-15 22:43:16 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-07-15 09:37:34 +00:00
|
|
|
|
2020-10-02 20:19:23 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ebellocchia";
|
2023-01-31 10:29:33 +00:00
|
|
|
repo = "bip_utils";
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-m7/CC5/T6qR2Ot4y5WQlzOAR0czz6XHCjJskES+2nns=";
|
2020-07-15 09:37:34 +00:00
|
|
|
};
|
|
|
|
|
2023-01-31 10:29:33 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace requirements.txt \
|
|
|
|
--replace "coincurve>=15.0.1,<18.0.0" "coincurve"
|
|
|
|
'';
|
|
|
|
|
2022-07-12 14:06:32 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
ecdsa
|
|
|
|
cbor2
|
|
|
|
pynacl
|
|
|
|
coincurve
|
|
|
|
crcmod
|
|
|
|
ed25519-blake2b
|
|
|
|
py-sr25519-bindings
|
|
|
|
pycryptodome
|
|
|
|
];
|
2020-07-15 09:37:34 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"bip_utils"
|
|
|
|
];
|
|
|
|
|
2023-01-31 10:29:33 +00:00
|
|
|
meta = with lib; {
|
2020-07-15 09:37:34 +00:00
|
|
|
description = "Implementation of BIP39, BIP32, BIP44, BIP49 and BIP84 for wallet seeds, keys and addresses generation";
|
|
|
|
homepage = "https://github.com/ebellocchia/bip_utils";
|
2023-01-31 10:29:33 +00:00
|
|
|
changelog = "https://github.com/ebellocchia/bip_utils/blob/v${version}/CHANGELOG.md";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ prusnak stargate01 ];
|
2020-07-15 09:37:34 +00:00
|
|
|
};
|
|
|
|
}
|