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