Files
nixpkgs/pkgs/development/python-modules/python-jose/default.nix
T

42 lines
1.0 KiB
Nix
Raw Normal View History

2017-03-16 00:43:58 +01:00
{ stdenv, buildPythonPackage, fetchFromGitHub
2018-12-03 15:01:09 +01:00
, future, six, ecdsa, rsa
, pycrypto, pytest, pytestcov, pytestrunner, cryptography
2017-03-16 00:43:58 +01:00
}:
buildPythonPackage rec {
2017-05-27 11:25:35 +02:00
pname = "python-jose";
2018-12-03 15:01:09 +01:00
version = "3.0.1";
2018-04-07 15:13:05 +02:00
2017-03-16 00:43:58 +01:00
src = fetchFromGitHub {
owner = "mpdavis";
repo = "python-jose";
2018-12-03 15:01:09 +01:00
rev = version;
sha256 = "1ahq4m86z504bnlk9z473r7r3dprg5m39900rld797hbczdhqa4f";
2017-03-16 00:43:58 +01:00
};
2018-04-07 15:13:05 +02:00
checkInputs = [
2018-12-03 15:01:09 +01:00
pycrypto
2018-04-07 15:13:05 +02:00
pytest
2018-12-03 15:01:09 +01:00
pytestcov
pytestrunner
cryptography # optional dependency, but needed in tests
2017-03-16 00:43:58 +01:00
];
2018-04-07 15:13:05 +02:00
checkPhase = ''
py.test
'';
postPatch = ''
# File says it's utf-8 so instead of relying on the environment, fix the decoding when reading.
substituteInPlace setup.py --replace "open('README.md')" "open('README.md',encoding='utf-8')"
'';
2018-12-03 15:01:09 +01:00
propagatedBuildInputs = [ future six ecdsa rsa ];
2018-04-07 15:13:05 +02:00
2017-03-16 00:43:58 +01:00
meta = with stdenv.lib; {
homepage = https://github.com/mpdavis/python-jose;
2017-03-16 00:43:58 +01:00
description = "A JOSE implementation in Python";
license = licenses.mit;
maintainers = [ maintainers.jhhuh ];
};
}