2021-02-17 17:02:09 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, mock
|
|
|
|
, pytestCheckHook
|
2022-12-17 10:02:37 +00:00
|
|
|
, pyyaml
|
2023-07-15 17:15:38 +00:00
|
|
|
, pythonOlder
|
2021-02-17 17:02:09 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-04-08 16:26:57 +00:00
|
|
|
pname = "configargparse";
|
2023-08-22 20:05:09 +00:00
|
|
|
version = "1.7";
|
2022-12-17 10:02:37 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2021-02-17 17:02:09 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bw2";
|
2021-04-08 16:26:57 +00:00
|
|
|
repo = "ConfigArgParse";
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-08-22 20:05:09 +00:00
|
|
|
hash = "sha256-m77MY0IZ1AJkd4/Y7ltApvdF9y17Lgn92WZPYTCU9tA=";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
passthru.optional-dependencies = {
|
|
|
|
yaml = [
|
|
|
|
pyyaml
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-02-17 17:02:09 +00:00
|
|
|
pytestCheckHook
|
2023-07-15 17:15:38 +00:00
|
|
|
mock
|
|
|
|
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
2021-02-17 17:02:09 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"configargparse"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A drop-in replacement for argparse";
|
2021-02-17 17:02:09 +00:00
|
|
|
homepage = "https://github.com/bw2/ConfigArgParse";
|
2023-07-15 17:15:38 +00:00
|
|
|
changelog = "https://github.com/bw2/ConfigArgParse/releases/tag/${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2023-07-15 17:15:38 +00:00
|
|
|
maintainers = with maintainers; [ willibutz ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|