Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / python-jose / default.nix
blob6e3f406fe5a30854af0b34ceafa588f63cf6717e
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
5 # build-system
6 , setuptools
8 # dependencies
9 , ecdsa
10 , rsa
11 , pyasn1
13 # optional-dependencies
14 , cryptography
15 , pycrypto
16 , pycryptodome
18 # tests
19 , pytestCheckHook
22 buildPythonPackage rec {
23   pname = "python-jose";
24   version = "3.3.0";
25   pyproject = true;
27   src = fetchFromGitHub {
28     owner = "mpdavis";
29     repo = pname;
30     rev = version;
31     hash = "sha256-6VGC6M5oyGCOiXcYp6mpyhL+JlcYZKIqOQU9Sm/TkKM=";
32   };
34   postPatch = ''
35     substituteInPlace setup.py \
36       --replace '"pytest-runner",' ""
37   '';
39   nativeBuildInputs = [
40     setuptools
41   ];
43   propagatedBuildInputs = [
44     ecdsa
45     pyasn1
46     rsa
47   ];
49   passthru.optional-dependencies = {
50     cryptography = [
51       cryptography
52     ];
53     pycrypto = [
54       pycrypto
55     ];
56     pycryptodome = [
57       pycryptodome
58     ];
59   };
61   pythonImportsCheck = [
62     "jose"
63   ];
65   nativeCheckInputs = [
66     pytestCheckHook
67   ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
69   meta = with lib; {
70     changelog = "https://github.com/mpdavis/python-jose/releases/tag/${version}";
71     homepage = "https://github.com/mpdavis/python-jose";
72     description = "A JOSE implementation in Python";
73     license = licenses.mit;
74     maintainers = with maintainers; [ jhhuh ];
75   };