1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonOlder, 6 setuptools, 7 packaging, 8 tomli, 9 pytestCheckHook, 10 pip, 11}: 12 13buildPythonPackage rec { 14 pname = "argparse-manpage"; 15 version = "4.6"; 16 pyproject = true; 17 18 src = fetchFromGitHub { 19 owner = "praiskup"; 20 repo = "argparse-manpage"; 21 tag = "v${version}"; 22 hash = "sha256-2GJDFLCaPTb8sQCAv9qZ+pIysFE7IaKh9co3Mb8Dutc="; 23 }; 24 25 nativeBuildInputs = [ 26 setuptools 27 packaging 28 ] ++ lib.optionals (pythonOlder "3.11") [ tomli ]; 29 30 propagatedBuildInputs = lib.optionals (pythonOlder "3.11") [ tomli ]; 31 32 nativeCheckInputs = [ 33 pytestCheckHook 34 pip 35 ]; 36 37 disabledTests = [ 38 # TypeError: dist must be a Distribution instance 39 "test_old_example" 40 "test_old_example_file_name" 41 ]; 42 43 pythonImportsCheck = [ "argparse_manpage" ]; 44 45 optional-dependencies = { 46 setuptools = [ setuptools ]; 47 }; 48 49 meta = with lib; { 50 description = "Automatically build man-pages for your Python project"; 51 homepage = "https://github.com/praiskup/argparse-manpage"; 52 changelog = "https://github.com/praiskup/argparse-manpage/blob/${src.rev}/NEWS"; 53 license = licenses.asl20; 54 maintainers = with maintainers; [ nickcao ]; 55 mainProgram = "argparse-manpage"; 56 }; 57}