57 lines
1.0 KiB
Nix

{
lib,
argparse-dataclass,
buildPythonPackage,
dpath,
fetchFromGitHub,
numpy,
pytestCheckHook,
pythonOlder,
pyyaml,
uv-build,
}:
buildPythonPackage rec {
pname = "yte";
version = "1.9.0";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "koesterlab";
repo = "yte";
tag = "v${version}";
hash = "sha256-kA4fQg2vpgDuW0OZOqzA6lggJLtSiQo+3SCOp7hnt8M=";
};
build-system = [ uv-build ];
dependencies = [
dpath
argparse-dataclass
pyyaml
];
nativeCheckInputs = [
numpy
pytestCheckHook
];
pythonImportsCheck = [ "yte" ];
preCheck = ''
# The CLI test need yte on the PATH
export PATH=$out/bin:$PATH
'';
meta = with lib; {
description = "YAML template engine with Python expressions";
homepage = "https://github.com/koesterlab/yte";
changelog = "https://github.com/yte-template-engine/yte/blob/${src.tag}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
mainProgram = "yte";
};
}