2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2020-10-09 04:20:00 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2021-03-20 04:20:00 +00:00
|
|
|
, fetchpatch
|
2020-10-09 04:20:00 +00:00
|
|
|
, pythonOlder
|
|
|
|
, pytestCheckHook
|
|
|
|
, setuptools
|
2021-03-20 04:20:00 +00:00
|
|
|
, packaging
|
2020-10-09 04:20:00 +00:00
|
|
|
, toml
|
|
|
|
, structlog
|
|
|
|
, appdirs
|
|
|
|
, pytest-asyncio
|
|
|
|
, flaky
|
|
|
|
, tornado
|
|
|
|
, pycurl
|
|
|
|
, aiohttp
|
|
|
|
, pytest-httpbin
|
|
|
|
, docutils
|
|
|
|
, installShellFiles
|
|
|
|
}:
|
2018-10-14 17:47:14 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "nvchecker";
|
2021-03-20 04:20:00 +00:00
|
|
|
version = "2.3";
|
2018-10-14 17:47:14 +00:00
|
|
|
|
2020-10-01 04:20:00 +00:00
|
|
|
# Tests not included in PyPI tarball
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lilydjwg";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-03-20 04:20:00 +00:00
|
|
|
sha256 = "0ikqjlw6v7va69i8qskj1lf07ik84q4n3qgsb7khk520gv2ks3sx";
|
2018-10-14 17:47:14 +00:00
|
|
|
};
|
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
patches = [
|
|
|
|
# Fix test that fail in sandbox build. See https://github.com/lilydjwg/nvchecker/pull/179
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/lilydjwg/nvchecker/commit/7366d82bfc3dcf231f7908e259bf2437cf7dafd5.patch";
|
|
|
|
sha256 = "0pwrwa2wyy4i668lk2mqzzy6y3xi08mq3w520b4954kfm07g75a9";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-10-09 04:20:00 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles docutils ];
|
2021-03-20 04:20:00 +00:00
|
|
|
propagatedBuildInputs = [ setuptools packaging toml structlog appdirs tornado pycurl aiohttp ];
|
2020-07-27 09:20:00 +00:00
|
|
|
checkInputs = [ pytestCheckHook pytest-asyncio flaky pytest-httpbin ];
|
2018-10-14 17:47:14 +00:00
|
|
|
|
2020-10-01 04:20:00 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2018-10-14 17:47:14 +00:00
|
|
|
|
2020-10-09 04:20:00 +00:00
|
|
|
postBuild = ''
|
|
|
|
patchShebangs docs/myrst2man.py
|
|
|
|
make -C docs man
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installManPage docs/_build/man/nvchecker.1
|
|
|
|
'';
|
|
|
|
|
2020-07-27 09:20:00 +00:00
|
|
|
pytestFlagsArray = [ "-m 'not needs_net'" ];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/lilydjwg/nvchecker";
|
2018-10-14 17:47:14 +00:00
|
|
|
description = "New version checker for software";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ marsam ];
|
|
|
|
};
|
|
|
|
}
|