1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 setuptools,
7 six,
8 timecop,
9 unittestCheckHook,
10}:
11
12buildPythonPackage rec {
13 pname = "onetimepass";
14 version = "1.0.1";
15 pyproject = true;
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "tadeck";
21 repo = "onetimepass";
22 tag = "v${version}";
23 hash = "sha256-cHJg3vdUpWp5+HACIeTGrqkHKUDS//aQICSjPKgwu3I=";
24 };
25
26 build-system = [ setuptools ];
27
28 dependencies = [ six ];
29
30 nativeCheckInputs = [
31 timecop
32 unittestCheckHook
33 ];
34
35 pythonImportsCheck = [ "onetimepass" ];
36
37 meta = with lib; {
38 description = "One-time password library for HMAC-based (HOTP) and time-based (TOTP) passwords";
39 homepage = "https://github.com/tadeck/onetimepass";
40 changelog = "https://github.com/tadeck/onetimepass/releases/tag/v${version}";
41 license = licenses.mit;
42 maintainers = with maintainers; [ zakame ];
43 };
44}