about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/shamir-mnemonic/default.nix
blob: 8d8a5f535b77b5741811cfcb4c4707c1948769cb (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
{ lib
, buildPythonPackage
, isPy3k
, fetchFromGitHub
, attrs
, click
, colorama
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "shamir-mnemonic";
  version = "0.2.2";
  format = "setuptools";

  disabled = !isPy3k;

  src = fetchFromGitHub {
    owner = "trezor";
    repo = "python-${pname}";
    rev = "v${version}";
    hash = "sha256-b9tBXN9dBdAeGg3xf5ZBdd6kPpFzseJl6wRTTfNZEwo=";
  };

  propagatedBuildInputs = [
    attrs
    click
    colorama
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "shamir_mnemonic" ];

  meta = with lib; {
    description = "Reference implementation of SLIP-0039";
    mainProgram = "shamir";
    homepage = "https://github.com/trezor/python-shamir-mnemonic";
    license = licenses.mit;
    maintainers = with maintainers; [ prusnak ];
  };
}