nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 click,
5 fetchPypi,
6 git, # shells out to git
7 hatchling,
8 incremental,
9 jinja2,
10 mock,
11 pytestCheckHook,
12 twisted,
13}:
14
15buildPythonPackage rec {
16 pname = "towncrier";
17 version = "25.8.0";
18 pyproject = true;
19
20 src = fetchPypi {
21 inherit pname version;
22 hash = "sha256-7vFtKfgxrVers64yoFZXOYZiGfHr+90pfTKJTrmUDrE=";
23 };
24
25 build-system = [ hatchling ];
26
27 dependencies = [
28 click
29 incremental
30 jinja2
31 ];
32
33 preCheck = ''
34 export PATH=$out/bin:$PATH
35 '';
36
37 nativeCheckInputs = [
38 git
39 mock
40 twisted
41 pytestCheckHook
42 ];
43
44 pythonImportsCheck = [ "towncrier" ];
45
46 meta = {
47 description = "Utility to produce useful, summarised news files";
48 homepage = "https://github.com/twisted/towncrier/";
49 changelog = "https://github.com/twisted/towncrier/blob/${version}/NEWS.rst";
50 license = lib.licenses.mit;
51 maintainers = [ ];
52 mainProgram = "towncrier";
53 };
54}