1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 nix-update-script, 6 setuptools, 7 setuptools-scm, 8 pytest-check, 9 pytest-mock, 10 pydantic_1, 11 pyyaml, 12 pytestCheckHook, 13 keyring, 14 macaroonbakery, 15 overrides, 16 pyxdg, 17 requests, 18 requests-toolbelt, 19}: 20 21buildPythonPackage rec { 22 pname = "craft-store"; 23 version = "2.6.0"; 24 25 pyproject = true; 26 27 src = fetchFromGitHub { 28 owner = "canonical"; 29 repo = "craft-store"; 30 rev = "refs/tags/${version}"; 31 hash = "sha256-VtKOe3IrvGcNWfp1/tg1cO94xtfkP7AbIHh0WTdlfbQ="; 32 }; 33 34 postPatch = '' 35 substituteInPlace pyproject.toml \ 36 --replace-fail "setuptools==67.7.2" "setuptools" 37 ''; 38 39 nativeBuildInputs = [ 40 setuptools 41 setuptools-scm 42 ]; 43 44 propagatedBuildInputs = [ 45 keyring 46 macaroonbakery 47 overrides 48 pydantic_1 49 pyxdg 50 requests 51 requests-toolbelt 52 ]; 53 54 pythonImportsCheck = [ "craft_store" ]; 55 56 nativeCheckInputs = [ 57 pydantic_1 58 pytest-check 59 pytest-mock 60 pytestCheckHook 61 pyyaml 62 ]; 63 64 pytestFlagsArray = [ "tests/unit" ]; 65 66 passthru.updateScript = nix-update-script { }; 67 68 meta = { 69 description = "Interfaces for communicating with Canonical Stores (e.g. Snap Store)"; 70 homepage = "https://github.com/canonical/craft-store"; 71 changelog = "https://github.com/canonical/craft-store/releases/tag/${version}"; 72 license = lib.licenses.lgpl3Only; 73 maintainers = with lib.maintainers; [ jnsgruk ]; 74 platforms = lib.platforms.linux; 75 }; 76}