Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 mock, 6 pytestCheckHook, 7 pyyaml, 8 pythonAtLeast, 9 pythonOlder, 10}: 11 12buildPythonPackage rec { 13 pname = "configargparse"; 14 version = "1.7"; 15 format = "setuptools"; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchFromGitHub { 20 owner = "bw2"; 21 repo = "ConfigArgParse"; 22 tag = version; 23 hash = "sha256-m77MY0IZ1AJkd4/Y7ltApvdF9y17Lgn92WZPYTCU9tA="; 24 }; 25 26 patches = [ 27 # https://github.com/bw2/ConfigArgParse/pull/295 28 ./python3.13-compat.patch 29 ]; 30 31 optional-dependencies = { 32 yaml = [ pyyaml ]; 33 }; 34 35 nativeCheckInputs = [ 36 pytestCheckHook 37 mock 38 ] 39 ++ lib.flatten (lib.attrValues optional-dependencies); 40 41 disabledTests = lib.optionals (pythonAtLeast "3.13") [ 42 # regex mismatch 43 "testMutuallyExclusiveArgs" 44 ]; 45 46 pythonImportsCheck = [ "configargparse" ]; 47 48 meta = with lib; { 49 description = "Drop-in replacement for argparse"; 50 homepage = "https://github.com/bw2/ConfigArgParse"; 51 changelog = "https://github.com/bw2/ConfigArgParse/releases/tag/${version}"; 52 license = licenses.mit; 53 maintainers = [ ]; 54 }; 55}