1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 nix-update-script, 6 protobuf, 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 tag = version; 28 hash = "sha256-NEhr8zkrHceeLbAyuUvc7U6dyQxkpkj0m5LlnBMafA0="; 29 }; 30 31 # fix version string 32 postPatch = '' 33 substituteInPlace setup.py \ 34 --replace-fail "VERSION = (1, 3, 3)" "VERSION = (1, 3, 4)" 35 ''; 36 37 build-system = [ setuptools ]; 38 39 dependencies = [ 40 protobuf 41 pymacaroons 42 pynacl 43 pyrfc3339 44 requests 45 ]; 46 47 pythonRelaxDeps = true; 48 49 pythonImportsCheck = [ "macaroonbakery" ]; 50 51 nativeCheckInputs = [ 52 fixtures 53 httmock 54 mock 55 pytestCheckHook 56 ]; 57 58 passthru.updateScript = nix-update-script { }; 59 60 meta = { 61 description = "Python library for working with macaroons"; 62 homepage = "https://github.com/go-macaroon-bakery/py-macaroon-bakery"; 63 changelog = "https://github.com/go-macaroon-bakery/py-macaroon-bakery/releases/tag/${version}"; 64 license = lib.licenses.lgpl3Only; 65 maintainers = with lib.maintainers; [ jnsgruk ]; 66 platforms = lib.platforms.linux; 67 }; 68}