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, questionary
14, requests
15, requests-mock
16}:
17
18buildPythonPackage rec {
19 pname = "myjwt";
20 version = "1.5.0";
21
22 src = fetchFromGitHub {
23 owner = "mBouamama";
24 repo = "MyJWT";
25 rev = version;
26 sha256 = "sha256-kZkqFeaQPd56BVaYmCWAbVu1xwbPAIlQC3u5/x3dh7A=";
27 };
28
29 propagatedBuildInputs = [
30 click
31 colorama
32 cryptography
33 exrex
34 pyopenssl
35 pyperclip
36 questionary
37 requests
38 ];
39
40 checkInputs = [
41 pytest-mock
42 pytestCheckHook
43 requests-mock
44 ];
45
46 postPatch = ''
47 # Remove all version pinning (E.g., tornado==5.1.1 -> tornado)
48 sed -i -e "s/==[0-9.]*//" requirements.txt
49 '';
50
51 pythonImportsCheck = [ "myjwt" ];
52
53 meta = with lib; {
54 description = "CLI tool for testing vulnerabilities of JSON Web Tokens (JWT)";
55 homepage = "https://github.com/mBouamama/MyJWT";
56 license = with licenses; [ mit ];
57 maintainers = with maintainers; [ fab ];
58 # Build failures
59 broken = stdenv.isDarwin;
60 };
61}