depot/third_party/nixpkgs/pkgs/development/python-modules/python-jose/default.nix
Default email ae91cbe6cc Project import generated by Copybara.
GitOrigin-RevId: 536fe36e23ab0fc8b7f35c24603422eee9fc17a2
2021-02-05 18:12:51 +01:00

46 lines
1 KiB
Nix

{ 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 ];
};
}