nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 setuptools,
8
9 # dependencies
10 cryptography,
11 pycryptodome,
12
13 # tests
14 pytestCheckHook,
15}:
16
17buildPythonPackage rec {
18 pname = "joserfc";
19 version = "1.6.1";
20 pyproject = true;
21
22 src = fetchFromGitHub {
23 owner = "authlib";
24 repo = "joserfc";
25 tag = version;
26 hash = "sha256-druh7ybcQBjTxUFMVLUwknw/aa/fyrUdS4ftS/ftYeA=";
27 };
28
29 build-system = [ setuptools ];
30
31 dependencies = [ cryptography ];
32
33 optional-dependencies = {
34 drafts = [ pycryptodome ];
35 };
36
37 nativeCheckInputs = [ pytestCheckHook ] ++ lib.concatAttrValues optional-dependencies;
38
39 pythonImportsCheck = [ "joserfc" ];
40
41 meta = {
42 changelog = "https://github.com/authlib/joserfc/blob/${src.tag}/docs/changelog.rst";
43 description = "Implementations of JOSE RFCs in Python";
44 homepage = "https://github.com/authlib/joserfc";
45 license = lib.licenses.bsd3;
46 maintainers = [ ];
47 };
48}