1{ lib
2, stdenv
3, buildPythonPackage
4, click
5, colorama
6, cryptography
7, exrex
8, fetchFromGitHub
9, pyopenssl
10, pyperclip
11, pytest-mock
12, pytestCheckHook
13, pythonOlder
14, questionary
15, requests
16, requests-mock
17}:
18
19buildPythonPackage rec {
20 pname = "myjwt";
21 version = "1.6.0";
22 format = "setuptools";
23
24 disabled = pythonOlder "3.7";
25
26 src = fetchFromGitHub {
27 owner = "mBouamama";
28 repo = "MyJWT";
29 rev = "refs/tags/${version}";
30 sha256 = "sha256-A9tsQ6L+y3doL5pJbau3yKnmQtX2IPXWyW/YCLhS7nc=";
31 };
32
33 propagatedBuildInputs = [
34 click
35 colorama
36 cryptography
37 exrex
38 pyopenssl
39 pyperclip
40 questionary
41 requests
42 ];
43
44 checkInputs = [
45 pytest-mock
46 pytestCheckHook
47 requests-mock
48 ];
49
50 postPatch = ''
51 # Remove all version pinning (E.g., tornado==5.1.1 -> tornado)
52 sed -i -e "s/==[0-9.]*//" requirements.txt
53 '';
54
55 pythonImportsCheck = [
56 "myjwt"
57 ];
58
59 meta = with lib; {
60 description = "CLI tool for testing vulnerabilities of JSON Web Tokens (JWT)";
61 homepage = "https://github.com/mBouamama/MyJWT";
62 license = with licenses; [ mit ];
63 maintainers = with maintainers; [ fab ];
64 # Build failures
65 broken = stdenv.isDarwin;
66 };
67}