1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonOlder
5, ecdsa
6, coincurve
7, pynacl
8, crcmod
9, ed25519-blake2b
10, py-sr25519-bindings
11, cbor2
12, pycryptodome
13}:
14
15buildPythonPackage rec {
16 pname = "bip-utils";
17 version = "2.7.0";
18 format = "setuptools";
19
20 disabled = pythonOlder "3.6";
21
22 src = fetchFromGitHub {
23 owner = "ebellocchia";
24 repo = "bip_utils";
25 rev = "refs/tags/v${version}";
26 hash = "sha256-m7/CC5/T6qR2Ot4y5WQlzOAR0czz6XHCjJskES+2nns=";
27 };
28
29 postPatch = ''
30 substituteInPlace requirements.txt \
31 --replace "coincurve>=15.0.1,<18.0.0" "coincurve"
32 '';
33
34 propagatedBuildInputs = [
35 ecdsa
36 cbor2
37 pynacl
38 coincurve
39 crcmod
40 ed25519-blake2b
41 py-sr25519-bindings
42 pycryptodome
43 ];
44
45 pythonImportsCheck = [
46 "bip_utils"
47 ];
48
49 meta = with lib; {
50 description = "Implementation of BIP39, BIP32, BIP44, BIP49 and BIP84 for wallet seeds, keys and addresses generation";
51 homepage = "https://github.com/ebellocchia/bip_utils";
52 changelog = "https://github.com/ebellocchia/bip_utils/blob/v${version}/CHANGELOG.md";
53 license = with licenses; [ mit ];
54 maintainers = with maintainers; [ prusnak stargate01 ];
55 };
56}