Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / myjwt / default.nix
bloba54ab560a235d60e7a23d499f1a9256d01a6d957
1 { lib
2 , stdenv
3 , buildPythonPackage
4 , click
5 , colorama
6 , cryptography
7 , exrex
8 , fetchFromGitHub
9 , poetry-core
10 , pyopenssl
11 , pyperclip
12 , pytest-mock
13 , pytestCheckHook
14 , pythonOlder
15 , questionary
16 , requests
17 , requests-mock
20 buildPythonPackage rec {
21   pname = "myjwt";
22   version = "1.6.1";
23   format = "pyproject";
25   disabled = pythonOlder "3.8";
27   src = fetchFromGitHub {
28     owner = "mBouamama";
29     repo = "MyJWT";
30     rev = "refs/tags/${version}";
31     hash = "sha256-qdDA8DpJ9kAPTvCkQcPBHNlUqxwsS0vAESglvUygXhg=";
32   };
34   postPatch = ''
35     substituteInPlace pyproject.toml \
36       --replace "1.6.0" "${version}" \
37       --replace 'cryptography = "^39.0.2"' 'cryptography = "^39.0.0"'
38   '';
40   nativeBuildInputs = [
41     poetry-core
42   ];
44   propagatedBuildInputs = [
45     click
46     colorama
47     cryptography
48     exrex
49     pyopenssl
50     pyperclip
51     questionary
52     requests
53   ];
55   nativeCheckInputs = [
56     pytest-mock
57     pytestCheckHook
58     requests-mock
59   ];
61   pythonImportsCheck = [
62     "myjwt"
63   ];
65   meta = with lib; {
66     description = "CLI tool for testing vulnerabilities of JSON Web Tokens (JWT)";
67     homepage = "https://github.com/mBouamama/MyJWT";
68     changelog = "https://github.com/tyki6/MyJWT/releases/tag/${version}";
69     license = with licenses; [ mit ];
70     maintainers = with maintainers; [ fab ];
71     # Build failures
72     broken = stdenv.isDarwin;
73   };