1{ lib
2, buildPythonPackage
3, isPy3k
4, fetchFromGitHub
5, attrs
6, click
7, colorama
8, pytestCheckHook
9}:
10
11buildPythonPackage rec {
12 pname = "shamir-mnemonic";
13 version = "0.2.2";
14
15 disabled = !isPy3k;
16
17 src = fetchFromGitHub {
18 owner = "trezor";
19 repo = "python-${pname}";
20 rev = "v${version}";
21 hash = "sha256-b9tBXN9dBdAeGg3xf5ZBdd6kPpFzseJl6wRTTfNZEwo=";
22 };
23
24 propagatedBuildInputs = [
25 attrs
26 click
27 colorama
28 ];
29
30 nativeCheckInputs = [ pytestCheckHook ];
31
32 pythonImportsCheck = [ "shamir_mnemonic" ];
33
34 meta = with lib; {
35 description = "Reference implementation of SLIP-0039";
36 homepage = "https://github.com/trezor/python-shamir-mnemonic";
37 license = licenses.mit;
38 maintainers = with maintainers; [ prusnak ];
39 };
40}