1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 nix-update-script,
6 protobuf3,
7 pymacaroons,
8 pynacl,
9 pyrfc3339,
10 requests,
11 setuptools,
12 httmock,
13 fixtures,
14 pytestCheckHook,
15 mock,
16}:
17
18buildPythonPackage rec {
19 pname = "macaroonbakery";
20 version = "1.3.4";
21
22 pyproject = true;
23
24 src = fetchFromGitHub {
25 owner = "go-macaroon-bakery";
26 repo = "py-macaroon-bakery";
27 rev = "refs/tags/${version}";
28 hash = "sha256-NEhr8zkrHceeLbAyuUvc7U6dyQxkpkj0m5LlnBMafA0=";
29 };
30
31 nativeBuildInputs = [ setuptools ];
32
33 propagatedBuildInputs = [
34 protobuf3
35 pymacaroons
36 pynacl
37 pyrfc3339
38 requests
39 ];
40
41 pythonImportsCheck = [ "macaroonbakery" ];
42
43 nativeCheckInputs = [
44 fixtures
45 httmock
46 mock
47 pytestCheckHook
48 ];
49
50 passthru.updateScript = nix-update-script { };
51
52 meta = {
53 description = "A Python library for working with macaroons";
54 homepage = "https://github.com/go-macaroon-bakery/py-macaroon-bakery";
55 changelog = "https://github.com/go-macaroon-bakery/py-macaroon-bakery/releases/tag/${version}";
56 license = lib.licenses.lgpl3Only;
57 maintainers = with lib.maintainers; [ jnsgruk ];
58 platforms = lib.platforms.linux;
59 };
60}