forked from mirrors/nixpkgs
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
47 lines
1 KiB
Nix
47 lines
1 KiB
Nix
{ lib, stdenv, 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 ];
|
|
};
|
|
}
|