diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/python-jose')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/python-jose/default.nix | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/python-jose/default.nix b/nixpkgs/pkgs/development/python-modules/python-jose/default.nix new file mode 100644 index 000000000000..15c6474cc388 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/python-jose/default.nix @@ -0,0 +1,46 @@ +{ lib, buildPythonPackage, fetchFromGitHub +, future, six, ecdsa, rsa +, pycrypto, pytestcov, pytestrunner, cryptography +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "python-jose"; + version = "3.2.0"; + + src = fetchFromGitHub { + owner = "mpdavis"; + repo = "python-jose"; + rev = version; + sha256 = "cSPIZrps0xFd4pPcQ4w/jFWOk2XYgd3mtE/sDzlytvY="; + }; + + checkInputs = [ + pycrypto + pytestCheckHook + pytestcov + pytestrunner + cryptography # optional dependency, but needed in tests + ]; + + # relax ecdsa deps + patchPhase = '' + substituteInPlace setup.py \ + --replace 'ecdsa<0.15' 'ecdsa' \ + --replace 'ecdsa <0.15' 'ecdsa' + ''; + + disabledTests = [ + # https://github.com/mpdavis/python-jose/issues/176 + "test_key_too_short" + ]; + + propagatedBuildInputs = [ future six ecdsa rsa ]; + + meta = with lib; { + homepage = "https://github.com/mpdavis/python-jose"; + description = "A JOSE implementation in Python"; + license = licenses.mit; + maintainers = [ maintainers.jhhuh ]; + }; +} |