about summary refs log tree commit diff
path: root/pkgs/development/python-modules/py-multihash/default.nix
blob: bf860e83e6b67cbd610dcbab6205b59efb441060 (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
{ lib
, base58
, buildPythonPackage
, fetchFromGitHub
, morphys
, pytestCheckHook
, six
, varint
}:

buildPythonPackage rec {
  pname = "py-multihash";
  version = "2.0.1";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "multiformats";
    repo = pname;
    rev = "refs/tags/v${version}";
    hash = "sha256-z1lmSypGCMFWJNzNgV9hx/IStyXbpd5jvrptFpewuOA=";
  };

  postPatch = ''
    substituteInPlace setup.py \
      --replace "'pytest-runner', " ""
  '';

  propagatedBuildInputs = [
    base58
    morphys
    six
    varint
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  pythonImportsCheck = [
    "multihash"
  ];

  meta = with lib; {
    description = "Self describing hashes - for future proofing";
    homepage = "https://github.com/multiformats/py-multihash";
    license = licenses.mit;
    maintainers = with maintainers; [ rakesh4g ];
  };
}