159e378cbb
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
59 lines
1.2 KiB
Nix
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.7.0";
|
|
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "canonical";
|
|
repo = "craft-cli";
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-PNurNP0ghG/R0rcUc5GfuPM5PTt+9FbJRjs61YJ1ytc=";
|
|
};
|
|
|
|
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;
|
|
};
|
|
}
|