mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-11-27 00:10:12 +00:00
55 lines
1.1 KiB
Nix
55 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
mock,
|
|
pytestCheckHook,
|
|
pyyaml,
|
|
pythonAtLeast,
|
|
setuptools,
|
|
setuptools-scm,
|
|
}:
|
|
|
|
buildPythonPackage (finalAttrs: {
|
|
pname = "configargparse";
|
|
version = "1.9.0";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "bw2";
|
|
repo = "ConfigArgParse";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-3ehzjwHLcxRw3O/g77lGG4tKWCc4ppswq+vcm0QCYFo=";
|
|
};
|
|
|
|
build-system = [
|
|
setuptools
|
|
setuptools-scm
|
|
];
|
|
|
|
optional-dependencies = {
|
|
yaml = [ pyyaml ];
|
|
};
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
mock
|
|
]
|
|
++ lib.flatten (builtins.attrValues finalAttrs.passthru.optional-dependencies);
|
|
|
|
disabledTests = lib.optionals (pythonAtLeast "3.13") [
|
|
# regex mismatch
|
|
"testMutuallyExclusiveArgs"
|
|
];
|
|
|
|
pythonImportsCheck = [ "configargparse" ];
|
|
|
|
meta = {
|
|
description = "Drop-in replacement for argparse";
|
|
homepage = "https://github.com/bw2/ConfigArgParse";
|
|
changelog = "https://github.com/bw2/ConfigArgParse/releases/tag/${finalAttrs.src.tag}";
|
|
license = lib.licenses.mit;
|
|
maintainers = [ ];
|
|
};
|
|
})
|