2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2023-04-12 12:48:02 +00:00
|
|
|
, platformdirs
|
2020-10-11 12:50:04 +00:00
|
|
|
, buildPythonPackage
|
2022-02-20 05:27:41 +00:00
|
|
|
, docutils
|
2020-10-11 12:50:04 +00:00
|
|
|
, fetchFromGitHub
|
2022-02-20 05:27:41 +00:00
|
|
|
, flaky
|
|
|
|
, installShellFiles
|
|
|
|
, pycurl
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-httpbin
|
2020-10-11 12:50:04 +00:00
|
|
|
, pytestCheckHook
|
2022-02-20 05:27:41 +00:00
|
|
|
, pythonOlder
|
2020-10-11 12:50:04 +00:00
|
|
|
, setuptools
|
|
|
|
, structlog
|
2022-02-20 05:27:41 +00:00
|
|
|
, tomli
|
2020-10-11 12:50:04 +00:00
|
|
|
, tornado
|
2024-04-21 15:54:59 +00:00
|
|
|
, awesomeversion
|
|
|
|
, packaging
|
|
|
|
, lxml
|
2020-10-11 12:50:04 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "nvchecker";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "2.14";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
2022-02-20 05:27:41 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-10-07 09:15:18 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lilydjwg";
|
2024-04-21 15:54:59 +00:00
|
|
|
repo = "nvchecker";
|
2020-10-07 09:15:18 +00:00
|
|
|
rev = "v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-QqfF8PGY8sULv1x0blu21ucWxqhOpQ7jyLuRCzDIpco=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
postPatch = ''
|
|
|
|
# Fix try/except syntax. Remove with the next release
|
|
|
|
substituteInPlace tests/test_jq.py \
|
|
|
|
--replace-warn "except jq" "except ImportError"
|
|
|
|
'';
|
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
nativeBuildInputs = [
|
2024-02-29 20:09:43 +00:00
|
|
|
setuptools
|
2022-02-20 05:27:41 +00:00
|
|
|
docutils
|
|
|
|
installShellFiles
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
structlog
|
2024-02-29 20:09:43 +00:00
|
|
|
platformdirs
|
2022-02-20 05:27:41 +00:00
|
|
|
tornado
|
2024-02-29 20:09:43 +00:00
|
|
|
pycurl
|
2023-07-15 17:15:38 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.11") [
|
|
|
|
tomli
|
2022-02-20 05:27:41 +00:00
|
|
|
];
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-02-20 05:27:41 +00:00
|
|
|
flaky
|
|
|
|
pytest-asyncio
|
|
|
|
pytest-httpbin
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-10-11 12:50:04 +00:00
|
|
|
postBuild = ''
|
|
|
|
patchShebangs docs/myrst2man.py
|
|
|
|
make -C docs man
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installManPage docs/_build/man/nvchecker.1
|
|
|
|
'';
|
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"nvchecker"
|
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"-m 'not needs_net'"
|
|
|
|
];
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
optional-dependencies = {
|
|
|
|
# vercmp = [ pyalpm ];
|
|
|
|
awesomeversion = [ awesomeversion ];
|
|
|
|
pypi = [ packaging ];
|
|
|
|
htmlparser = [ lxml ];
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "New version checker for software";
|
2023-07-15 17:15:38 +00:00
|
|
|
homepage = "https://github.com/lilydjwg/nvchecker";
|
|
|
|
changelog = "https://github.com/lilydjwg/nvchecker/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ marsam ];
|
|
|
|
};
|
|
|
|
}
|