Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at gcc-offload 59 lines 1.2 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 nix-update-script, 6 platformdirs, 7 pyyaml, 8 setuptools-scm, 9 pytest-check, 10 pytest-mock, 11 pytestCheckHook, 12}: 13 14buildPythonPackage rec { 15 pname = "craft-cli"; 16 version = "2.12.0"; 17 18 pyproject = true; 19 20 src = fetchFromGitHub { 21 owner = "canonical"; 22 repo = "craft-cli"; 23 rev = "refs/tags/${version}"; 24 hash = "sha256-edN0eEXBaYDUqSc7Xv22MpG9wkHqI6x1HtRkQ468yH8="; 25 }; 26 27 postPatch = '' 28 substituteInPlace pyproject.toml \ 29 --replace-fail "setuptools==75.2.0" "setuptools" 30 ''; 31 32 build-system = [ setuptools-scm ]; 33 34 dependencies = [ 35 platformdirs 36 pyyaml 37 ]; 38 39 pythonImportsCheck = [ "craft_cli" ]; 40 41 nativeCheckInputs = [ 42 pytest-check 43 pytest-mock 44 pytestCheckHook 45 ]; 46 47 pytestFlagsArray = [ "tests/unit" ]; 48 49 passthru.updateScript = nix-update-script { }; 50 51 meta = { 52 description = "CLI builder for Canonical's CLI Guidelines"; 53 homepage = "https://github.com/canonical/craft-cli"; 54 changelog = "https://github.com/canonical/craft-cli/releases/tag/${version}"; 55 license = lib.licenses.lgpl3Only; 56 maintainers = with lib.maintainers; [ jnsgruk ]; 57 platforms = lib.platforms.linux; 58 }; 59}