1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pycryptodomex,
6 pysocks,
7 pynacl,
8 requests,
9 six,
10 varint,
11 pytestCheckHook,
12 pytest-cov,
13 responses,
14}:
15
16buildPythonPackage rec {
17 pname = "monero";
18 version = "1.1.1";
19 format = "setuptools";
20
21 src = fetchFromGitHub {
22 owner = "monero-ecosystem";
23 repo = "monero-python";
24 rev = "v${version}";
25 hash = "sha256-WIF3pFBOLgozYTrQHLzIRgSlT3dTZTe+7sF/dVjVdTo=";
26 };
27
28 postPatch = ''
29 substituteInPlace requirements.txt \
30 --replace 'pynacl~=1.4' 'pynacl>=1.4' \
31 --replace 'ipaddress' ""
32 '';
33
34 pythonImportsCheck = [ "monero" ];
35
36 propagatedBuildInputs = [
37 pycryptodomex
38 pynacl
39 pysocks
40 requests
41 six
42 varint
43 ];
44
45 nativeCheckInputs = [
46 pytestCheckHook
47 pytest-cov
48 responses
49 ];
50
51 meta = with lib; {
52 description = "Comprehensive Python module for handling Monero";
53 homepage = "https://github.com/monero-ecosystem/monero-python";
54 license = licenses.bsd3;
55 maintainers = with maintainers; [ prusnak ];
56 };
57}