2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-10-11 12:50:04 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2021-03-23 19:22:30 +00:00
|
|
|
, fetchpatch
|
2020-10-11 12:50:04 +00:00
|
|
|
, pythonOlder
|
|
|
|
, pytestCheckHook
|
|
|
|
, setuptools
|
2021-03-23 19:22:30 +00:00
|
|
|
, packaging
|
2020-10-11 12:50:04 +00:00
|
|
|
, toml
|
|
|
|
, structlog
|
|
|
|
, appdirs
|
|
|
|
, pytest-asyncio
|
|
|
|
, flaky
|
|
|
|
, tornado
|
|
|
|
, pycurl
|
|
|
|
, aiohttp
|
|
|
|
, pytest-httpbin
|
|
|
|
, docutils
|
|
|
|
, installShellFiles
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "nvchecker";
|
2021-03-23 19:22:30 +00:00
|
|
|
version = "2.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-10-07 09:15:18 +00:00
|
|
|
# Tests not included in PyPI tarball
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lilydjwg";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-03-23 19:22:30 +00:00
|
|
|
sha256 = "0ikqjlw6v7va69i8qskj1lf07ik84q4n3qgsb7khk520gv2ks3sx";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-03-23 19:22:30 +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-11 12:50:04 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles docutils ];
|
2021-03-23 19:22:30 +00:00
|
|
|
propagatedBuildInputs = [ setuptools packaging toml structlog appdirs tornado pycurl aiohttp ];
|
2020-08-20 17:08:02 +00:00
|
|
|
checkInputs = [ pytestCheckHook pytest-asyncio flaky pytest-httpbin ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-10-07 09:15:18 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
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
|
|
|
|
'';
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
pytestFlagsArray = [ "-m 'not needs_net'" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/lilydjwg/nvchecker";
|
|
|
|
description = "New version checker for software";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ marsam ];
|
|
|
|
};
|
|
|
|
}
|