about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pycardano/default.nix
blob: 75bef6723d5df65d7ab8bf9d7c8fe18569464013 (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonRelaxDepsHook
# Python deps
, blockfrost-python
, cachetools
, cbor2
, cose
, ecpy
, frozendict
, frozenlist
, mnemonic
, poetry-core
, pprintpp
, pynacl
, setuptools
, typeguard
, websocket-client
}:

let
  cose_0_9_dev8 = cose.overridePythonAttrs (old: rec {
    version = "0.9.dev8";
    src = (old.src.override {
      rev = "v${version}";
      hash = "sha256-/jwq2C2nvHInsgPG4jZCr+XsvlUJdYewAkasrUPVaHM=";
    });
    pythonImportsCheck = [ "cose" ];
  });

in buildPythonPackage rec {
  pname = "pycardano";
  version = "0.10.0";

  format = "pyproject";

  src = fetchFromGitHub {
    owner = "Python-Cardano";
    repo = "pycardano";
    rev = "v${version}";
    hash = "sha256-LP/W8IC2del476fGFq10VMWwMrbAoCCcZOngA8unBM0=";
  };

  nativeBuildInputs = [
    pythonRelaxDepsHook
  ];

  propagatedBuildInputs = [
    blockfrost-python
    cachetools
    cbor2
    cose_0_9_dev8
    ecpy
    frozendict
    frozenlist
    mnemonic
    poetry-core
    pprintpp
    pynacl
    setuptools
    typeguard
    websocket-client
  ];

  pythonRelaxDeps = [ "typeguard" ];

  pythonImportsCheck = [ "pycardano" ];

  meta = with lib; {
    description = "A lightweight Cardano library in Python";
    homepage = "https://github.com/Python-Cardano/pycardano";
    license = licenses.mit;
    maintainers = with maintainers; [ t4ccer ];
  };
}