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