about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/help2man/default.nix
blob: 38cff88b4a12c618496bc3950b0b4c5f30deaac7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, jinja2
, setuptools-scm
, shtab
, tomli
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "help2man";
  version = "0.0.9";
  pyproject = true;

  disabled = pythonOlder "3.9";

  src = fetchFromGitHub {
    owner = "Freed-Wu";
    repo = "help2man";
    rev = version;
    hash = "sha256-BIDn+LQzBtDHUtFvIRL3NMXNouO3cMLibuYBoFtCUxI=";
  };

  env.SETUPTOOLS_SCM_PRETEND_VERSION = version;

  nativeBuildInputs = [
    jinja2
    setuptools-scm
    shtab
    tomli
  ];

  propagatedBuildInputs = [
    jinja2
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  pythonImportsCheck = [ "help2man" ];

  meta = with lib; {
    description = "Convert --help and --version to man page";
    homepage = "https://github.com/Freed-Wu/help2man";
    license = licenses.gpl3Only;
    maintainers = with maintainers; [ natsukium ];
    mainProgram = "help2man";
  };
}