1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 click,
6 colorama,
7 cryptography,
8 exrex,
9 fetchFromGitHub,
10 poetry-core,
11 pyopenssl,
12 pyperclip,
13 pytest-mock,
14 pytestCheckHook,
15 pythonOlder,
16 pythonRelaxDepsHook,
17 questionary,
18 requests,
19 requests-mock,
20}:
21
22buildPythonPackage rec {
23 pname = "myjwt";
24 version = "1.6.1";
25 pyproject = true;
26
27 disabled = pythonOlder "3.8";
28
29 src = fetchFromGitHub {
30 owner = "mBouamama";
31 repo = "MyJWT";
32 rev = "refs/tags/${version}";
33 hash = "sha256-qdDA8DpJ9kAPTvCkQcPBHNlUqxwsS0vAESglvUygXhg=";
34 };
35
36 postPatch = ''
37 substituteInPlace pyproject.toml \
38 --replace-fail "1.6.0" "${version}"
39 '';
40
41 pythonRelaxDeps = [
42 "cryptography"
43 "pyopenssl"
44 "questionary"
45 ];
46
47 build-system = [
48 poetry-core
49 pythonRelaxDepsHook
50 ];
51
52 dependencies = [
53 click
54 colorama
55 cryptography
56 exrex
57 pyopenssl
58 pyperclip
59 questionary
60 requests
61 ];
62
63 nativeCheckInputs = [
64 pytest-mock
65 pytestCheckHook
66 requests-mock
67 ];
68
69 pythonImportsCheck = [ "myjwt" ];
70
71 meta = with lib; {
72 description = "CLI tool for testing vulnerabilities of JSON Web Tokens (JWT)";
73 homepage = "https://github.com/mBouamama/MyJWT";
74 changelog = "https://github.com/tyki6/MyJWT/releases/tag/${version}";
75 license = with licenses; [ mit ];
76 maintainers = with maintainers; [ fab ];
77 # Build failures
78 broken = stdenv.isDarwin;
79 };
80}