blob: 16fdbf181583dc2e9704df128311f4ae7f74e4bd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
{
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;
};
}
|