2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
nix-update-script,
|
|
|
|
overrides,
|
|
|
|
setuptools,
|
|
|
|
pytest-check,
|
|
|
|
pytest-mock,
|
|
|
|
pytestCheckHook,
|
|
|
|
pydantic_1,
|
|
|
|
pyyaml,
|
2024-04-21 15:54:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "craft-grammar";
|
|
|
|
version = "1.2.0";
|
|
|
|
|
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "canonical";
|
|
|
|
repo = "craft-grammar";
|
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-YQpxgdmUxYLkhAXDLlkLAK6VpjIEycLFY3nsE/M4o2g=";
|
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ overrides ];
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "craft_grammar" ];
|
2024-04-21 15:54:59 +00:00
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pydantic_1
|
|
|
|
pytestCheckHook
|
|
|
|
pyyaml
|
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [ "tests/unit" ];
|
|
|
|
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Advanced grammar for Canonical's craft-parts library";
|
|
|
|
homepage = "https://github.com/canonical/craft-grammar";
|
|
|
|
changelog = "https://github.com/canonical/craft-grammar/releases/tag/${version}";
|
|
|
|
license = lib.licenses.lgpl3Only;
|
|
|
|
maintainers = with lib.maintainers; [ jnsgruk ];
|
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|