2022-12-28 21:21:41 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2020-08-20 17:08:02 +00:00
|
|
|
, click
|
2024-01-02 11:29:13 +00:00
|
|
|
, fetchPypi
|
|
|
|
, git # shells out to git
|
|
|
|
, hatchling
|
|
|
|
, importlib-resources
|
2020-08-20 17:08:02 +00:00
|
|
|
, incremental
|
|
|
|
, jinja2
|
2021-09-18 10:52:07 +00:00
|
|
|
, mock
|
2020-08-20 17:08:02 +00:00
|
|
|
, pytestCheckHook
|
2024-01-02 11:29:13 +00:00
|
|
|
, pythonOlder
|
|
|
|
, tomli
|
2020-08-20 17:08:02 +00:00
|
|
|
, twisted
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "towncrier";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "23.11.0";
|
|
|
|
pyproject = true;
|
2022-12-28 21:21:41 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-E5N8JH4/iuIKxE2JXPX5amCtRs/cwWcXWVMNeDfZ7l0=";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace "hatchling ~= 1.17.1" "hatchling"
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
hatchling
|
|
|
|
];
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
click
|
|
|
|
incremental
|
|
|
|
jinja2
|
2024-01-02 11:29:13 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.10") [
|
|
|
|
importlib-resources
|
|
|
|
] ++ lib.optionals (pythonOlder "3.11") [
|
|
|
|
tomli
|
2020-08-20 17:08:02 +00:00
|
|
|
];
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
preCheck = ''
|
|
|
|
export PATH=$out/bin:$PATH
|
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-09-18 10:52:07 +00:00
|
|
|
git
|
|
|
|
mock
|
|
|
|
twisted
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2022-04-15 01:41:22 +00:00
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"towncrier"
|
|
|
|
];
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Utility to produce useful, summarised news files";
|
|
|
|
homepage = "https://github.com/twisted/towncrier/";
|
2022-12-28 21:21:41 +00:00
|
|
|
changelog = "https://github.com/twisted/towncrier/blob/${version}/NEWS.rst";
|
2020-08-20 17:08:02 +00:00
|
|
|
license = licenses.mit;
|
2022-12-28 21:21:41 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
}
|