depot/third_party/nixpkgs/pkgs/development/python-modules/craft-cli/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

59 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
nix-update-script,
platformdirs,
pyyaml,
setuptools-scm,
pytest-check,
pytest-mock,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "craft-cli";
version = "2.6.0";
pyproject = true;
src = fetchFromGitHub {
owner = "canonical";
repo = "craft-cli";
rev = "refs/tags/${version}";
hash = "sha256-8+dyFOEW0F4t2issRlOqdbzf0Avg0NsADgk96mZFpEQ=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "setuptools==70.1.0" "setuptools"
'';
build-system = [ setuptools-scm ];
dependencies = [
platformdirs
pyyaml
];
pythonImportsCheck = [ "craft_cli" ];
nativeCheckInputs = [
pytest-check
pytest-mock
pytestCheckHook
];
pytestFlagsArray = [ "tests/unit" ];
passthru.updateScript = nix-update-script { };
meta = {
description = "CLI builder for Canonical's CLI Guidelines";
homepage = "https://github.com/canonical/craft-cli";
changelog = "https://github.com/canonical/craft-cli/releases/tag/${version}";
license = lib.licenses.lgpl3Only;
maintainers = with lib.maintainers; [ jnsgruk ];
platforms = lib.platforms.linux;
};
}