Files
nixpkgs/pkgs/development/python-modules/help2man/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

53 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pythonAtLeast,
jinja2,
setuptools-scm,
shtab,
tomli,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "help2man";
version = "0.0.9";
pyproject = true;
src = fetchFromGitHub {
owner = "Freed-Wu";
repo = "help2man";
rev = version;
hash = "sha256-BIDn+LQzBtDHUtFvIRL3NMXNouO3cMLibuYBoFtCUxI=";
};
build-system = [
jinja2
setuptools-scm
shtab
tomli
];
dependencies = [ jinja2 ];
nativeCheckInputs = [ pytestCheckHook ];
disabledTests = lib.optionals (pythonAtLeast "3.13") [
# Checks the output of `help2man --help`.
# Broken since 3.13 due to changes in `argparse`.
# Upstream issue: https://github.com/Freed-Wu/help2man/issues/6
"test_help"
];
pythonImportsCheck = [ "help2man" ];
meta = {
description = "Convert --help and --version to man page";
homepage = "https://github.com/Freed-Wu/help2man";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ natsukium ];
mainProgram = "help2man";
};
}