about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/monero/default.nix
blob: 71554607326cbd971923798829ecd7c56f092aaa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{ lib
, buildPythonPackage
, fetchFromGitHub
, pycryptodomex
, pysocks
, pynacl
, requests
, six
, varint
, pytestCheckHook
, pytest-cov
, responses
}:

buildPythonPackage rec {
  pname = "monero";
  version = "1.1.1";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "monero-ecosystem";
    repo = "monero-python";
    rev = "v${version}";
    hash = "sha256-WIF3pFBOLgozYTrQHLzIRgSlT3dTZTe+7sF/dVjVdTo=";
  };

  postPatch = ''
    substituteInPlace requirements.txt \
      --replace 'pynacl~=1.4' 'pynacl>=1.4' \
      --replace 'ipaddress' ""
  '';

  pythonImportsCheck = [ "monero" ];

  propagatedBuildInputs = [
    pycryptodomex
    pynacl
    pysocks
    requests
    six
    varint
  ];

  nativeCheckInputs = [ pytestCheckHook pytest-cov responses ];

  meta = with lib; {
    description = "Comprehensive Python module for handling Monero";
    homepage = "https://github.com/monero-ecosystem/monero-python";
    license = licenses.bsd3;
    maintainers = with maintainers; [ prusnak ];
  };
}