1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonAtLeast,
6 jinja2,
7 setuptools-scm,
8 shtab,
9 tomli,
10 pytestCheckHook,
11}:
12
13buildPythonPackage rec {
14 pname = "help2man";
15 version = "0.0.9";
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "Freed-Wu";
20 repo = "help2man";
21 rev = version;
22 hash = "sha256-BIDn+LQzBtDHUtFvIRL3NMXNouO3cMLibuYBoFtCUxI=";
23 };
24
25 build-system = [
26 jinja2
27 setuptools-scm
28 shtab
29 tomli
30 ];
31
32 dependencies = [ jinja2 ];
33
34 nativeCheckInputs = [ pytestCheckHook ];
35
36 disabledTests = lib.optionals (pythonAtLeast "3.13") [
37 # Checks the output of `help2man --help`.
38 # Broken since 3.13 due to changes in `argparse`.
39 # Upstream issue: https://github.com/Freed-Wu/help2man/issues/6
40 "test_help"
41 ];
42
43 pythonImportsCheck = [ "help2man" ];
44
45 meta = with lib; {
46 description = "Convert --help and --version to man page";
47 homepage = "https://github.com/Freed-Wu/help2man";
48 license = licenses.gpl3Only;
49 maintainers = with maintainers; [ natsukium ];
50 mainProgram = "help2man";
51 };
52}