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