nixpkgs/pkgs/development/python-modules/yte/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

62 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, dpath
, fetchFromGitHub
, plac
, poetry-core
, pytestCheckHook
, pythonOlder
, pyyaml
}:
buildPythonPackage rec {
pname = "yte";
version = "1.5.4";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "koesterlab";
repo = "yte";
rev = "refs/tags/v${version}";
hash = "sha256-Rm3EKxRZCdYErkyWK9+fF2W7C+v5/MXD/LkehmB6UNQ=";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
dpath
plac
pyyaml
];
nativeCheckInputs = [
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";
mainProgram = "yte";
homepage = "https://github.com/koesterlab/yte";
changelog = "https://github.com/yte-template-engine/yte/blob/v${version}/CHANGELOG.md";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}