2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
click,
|
|
|
|
fetchPypi,
|
|
|
|
git, # shells out to git
|
|
|
|
hatchling,
|
|
|
|
importlib-resources,
|
|
|
|
incremental,
|
|
|
|
jinja2,
|
|
|
|
mock,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
tomli,
|
|
|
|
twisted,
|
2020-08-20 17:08:02 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
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"
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ hatchling ];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs =
|
|
|
|
[
|
|
|
|
click
|
|
|
|
incremental
|
|
|
|
jinja2
|
|
|
|
]
|
|
|
|
++ 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
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "towncrier" ];
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Utility to produce useful, summarised news files";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "towncrier";
|
2020-08-20 17:08:02 +00:00
|
|
|
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;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
}
|