nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pycryptodomex,
6 pytestCheckHook,
7 requests,
8 setuptools,
9 six,
10}:
11
12buildPythonPackage rec {
13 pname = "pyjwkest";
14 version = "1.4.4";
15 pyproject = true;
16
17 src = fetchFromGitHub {
18 owner = "IdentityPython";
19 repo = "pyjwkest";
20 tag = "v${version}";
21 hash = "sha256-G4/qLOOQHsNSMVndUdYBhrrk8uEufbI8Od3ziQiY0XI=";
22 };
23
24 build-system = [ setuptools ];
25
26 # Remove unused future import, see pending PR:
27 # https://github.com/IdentityPython/pyjwkest/pull/107
28 postPatch = ''
29 substituteInPlace setup.py \
30 --replace-fail '"future"' ""
31 '';
32
33 dependencies = [
34 pycryptodomex
35 requests
36 six
37 ];
38
39 nativeCheckInputs = [ pytestCheckHook ];
40
41 pythonImportsCheck = [ "jwkest" ];
42
43 meta = {
44 description = "Implementation of JWT, JWS, JWE and JWK";
45 homepage = "https://github.com/IdentityPython/pyjwkest";
46 license = lib.licenses.asl20;
47 };
48}