summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/myjwt/default.nix
blob: 45f5c4b89b6c51702de9fe5cc28054ec0baba7b5 (plain)
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
68
69
{
  lib,
  stdenv,
  buildPythonPackage,
  click,
  colorama,
  cryptography,
  exrex,
  fetchFromGitHub,
  poetry-core,
  pyopenssl,
  pyperclip,
  pytest-mock,
  pytestCheckHook,
  questionary,
  requests,
  requests-mock,
}:

buildPythonPackage rec {
  pname = "myjwt";
  version = "2.1.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "mBouamama";
    repo = "MyJWT";
    tag = version;
    hash = "sha256-jqBnxo7Omn5gLMCQ7SNbjo54nyFK7pn94796z2Qc9lg=";
  };

  pythonRelaxDeps = [
    "cryptography"
    "pyopenssl"
    "questionary"
  ];

  build-system = [ poetry-core ];

  dependencies = [
    click
    colorama
    cryptography
    exrex
    pyopenssl
    pyperclip
    questionary
    requests
  ];

  nativeCheckInputs = [
    pytest-mock
    pytestCheckHook
    requests-mock
  ];

  pythonImportsCheck = [ "myjwt" ];

  meta = {
    description = "CLI tool for testing vulnerabilities of JSON Web Tokens (JWT)";
    homepage = "https://github.com/mBouamama/MyJWT";
    changelog = "https://github.com/tyki6/MyJWT/releases/tag/${src.tag}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ fab ];
    mainProgram = "myjwt";
    # Build failures
    broken = stdenv.hostPlatform.isDarwin;
  };
}