depot/third_party/nixpkgs/pkgs/development/python-modules/craft-grammar/default.nix
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +02:00

50 lines
1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
nix-update-script,
overrides,
setuptools-scm,
pytestCheckHook,
pydantic,
pyyaml,
}:
buildPythonPackage rec {
pname = "craft-grammar";
version = "2.0.1";
pyproject = true;
src = fetchFromGitHub {
owner = "canonical";
repo = "craft-grammar";
rev = "refs/tags/${version}";
hash = "sha256-xex+7rCXqRegnws470VtVltM49fx7fSHzWDZawRmOdM=";
};
build-system = [ setuptools-scm ];
dependencies = [ overrides ];
pythonImportsCheck = [ "craft_grammar" ];
nativeCheckInputs = [
pydantic
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;
};
}