2022-05-01 08:12:02 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-05-10 21:48:07 +00:00
|
|
|
, dpath
|
2022-05-01 08:12:02 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, plac
|
|
|
|
, poetry-core
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, pyyaml
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "yte";
|
2022-06-04 08:04:16 +00:00
|
|
|
version = "1.5.1";
|
2022-05-01 08:12:02 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "koesterlab";
|
|
|
|
repo = pname;
|
2022-05-07 05:05:11 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-03-03 00:48:06 +00:00
|
|
|
hash = "sha256-7erT5UpejPMIoyqhpYNEON3YWE2l5SdP2olOVpkbNkY=";
|
2022-05-01 08:12:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2022-05-10 21:48:07 +00:00
|
|
|
dpath
|
2022-05-01 08:12:02 +00:00
|
|
|
plac
|
|
|
|
pyyaml
|
|
|
|
];
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2022-05-01 08:12:02 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"yte"
|
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"tests.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
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";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|