1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 requests,
6 webob,
7 fetchpatch,
8 setuptools,
9}:
10
11buildPythonPackage rec {
12 pname = "tokenlib";
13 version = "2.0.0";
14
15 pyproject = true;
16 build-system = [ setuptools ];
17
18 src = fetchFromGitHub {
19 owner = "mozilla-services";
20 repo = "tokenlib";
21 rev = "${version}";
22 hash = "sha256-+KybaLb4XAcuBARJUhL5gK71jfNMb8YL8dV5Vzf7yXI=";
23 };
24
25 patches = [
26 # fix wrong function name in tests
27 # See https://github.com/mozilla-services/tokenlib/pull/9
28 (fetchpatch {
29 url = "https://github.com/mozilla-services/tokenlib/pull/9/commits/cb7ef761f82f36e40069bd1b8684eec05af3b8a3.patch";
30 hash = "sha256-hc+iydxZu9bFqBD0EQDWMkRs2ibqNAhx6Qxjh6ppKNw=";
31 })
32 ];
33
34 dependencies = [
35 requests
36 webob
37 ];
38
39 pythonImportsCheck = [ "tokenlib" ];
40
41 meta = with lib; {
42 homepage = "https://github.com/mozilla-services/tokenlib";
43 description = "Generic support library for signed-token-based auth schemes";
44 license = licenses.mpl20;
45 };
46}