2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
nix-update-script,
|
|
|
|
platformdirs,
|
|
|
|
pyyaml,
|
|
|
|
setuptools-scm,
|
|
|
|
pytest-check,
|
|
|
|
pytest-mock,
|
|
|
|
pytestCheckHook,
|
2024-04-21 15:54:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "craft-cli";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "2.7.0";
|
2024-04-21 15:54:59 +00:00
|
|
|
|
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "canonical";
|
|
|
|
repo = "craft-cli";
|
|
|
|
rev = "refs/tags/${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-PNurNP0ghG/R0rcUc5GfuPM5PTt+9FbJRjs61YJ1ytc=";
|
2024-04-21 15:54:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2024-07-27 06:49:29 +00:00
|
|
|
--replace-fail "setuptools==70.1.0" "setuptools"
|
2024-04-21 15:54:59 +00:00
|
|
|
'';
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
build-system = [ setuptools-scm ];
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
dependencies = [
|
2024-04-21 15:54:59 +00:00
|
|
|
platformdirs
|
|
|
|
pyyaml
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "craft_cli" ];
|
2024-04-21 15:54:59 +00:00
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytest-check
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [ "tests/unit" ];
|
|
|
|
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
|
|
|
|
meta = {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "CLI builder for Canonical's CLI Guidelines";
|
2024-04-21 15:54:59 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|