2024-07-27 06:49:29 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
annotated-types,
|
|
|
|
distro,
|
|
|
|
fetchFromGitHub,
|
|
|
|
nix-update-script,
|
|
|
|
pytest-check,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
|
|
|
setuptools-scm,
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "craft-platforms";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0.2.0";
|
2024-07-27 06:49:29 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.10";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "canonical";
|
|
|
|
repo = "craft-platforms";
|
|
|
|
rev = "refs/tags/${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-chCPuncy+//Y5iohTh0d8qRNaEno6Sqze2Zoas3uwPQ=";
|
2024-07-27 06:49:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace craft_platforms/__init__.py --replace-fail "dev" "${version}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
build-system = [
|
|
|
|
setuptools
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
annotated-types
|
|
|
|
distro
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
pytest-check
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "craft_platforms" ];
|
|
|
|
|
|
|
|
pytestFlagsArray = [ "tests/unit" ];
|
|
|
|
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Manage platforms and architectures for charm applications";
|
|
|
|
homepage = "https://github.com/canonical/craft-platforms";
|
|
|
|
changelog = "https://github.com/canonical/craft-platforms/releases/tag/${version}";
|
|
|
|
license = lib.licenses.lgpl3Only;
|
|
|
|
maintainers = with lib.maintainers; [ jnsgruk ];
|
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|