at master 1.7 kB view raw
1{ 2 lib, 3 platformdirs, 4 buildPythonPackage, 5 docutils, 6 fetchFromGitHub, 7 nix-update-script, 8 flaky, 9 installShellFiles, 10 pycurl, 11 pytest-asyncio, 12 pytest-httpbin, 13 pytestCheckHook, 14 pythonOlder, 15 setuptools, 16 structlog, 17 tomli, 18 tornado, 19 awesomeversion, 20 packaging, 21 lxml, 22}: 23 24buildPythonPackage rec { 25 pname = "nvchecker"; 26 version = "2.18"; 27 pyproject = true; 28 29 disabled = pythonOlder "3.8"; 30 31 src = fetchFromGitHub { 32 owner = "lilydjwg"; 33 repo = "nvchecker"; 34 tag = "v${version}"; 35 hash = "sha256-6uFox07mZeKwyhRXGuU8dMoPhLB5CkgdLaWCfG2dy4k="; 36 }; 37 38 build-system = [ setuptools ]; 39 40 nativeBuildInputs = [ 41 docutils 42 installShellFiles 43 ]; 44 45 propagatedBuildInputs = [ 46 structlog 47 platformdirs 48 tornado 49 pycurl 50 ] 51 ++ lib.optionals (pythonOlder "3.11") [ tomli ]; 52 53 __darwinAllowLocalNetworking = true; 54 55 nativeCheckInputs = [ 56 flaky 57 pytest-asyncio 58 pytest-httpbin 59 pytestCheckHook 60 ]; 61 62 postBuild = '' 63 patchShebangs docs/myrst2man.py 64 make -C docs man 65 ''; 66 67 postInstall = '' 68 installManPage docs/_build/man/nvchecker.1 69 ''; 70 71 pythonImportsCheck = [ "nvchecker" ]; 72 73 disabledTestMarks = [ "needs_net" ]; 74 75 optional-dependencies = { 76 # vercmp = [ pyalpm ]; 77 awesomeversion = [ awesomeversion ]; 78 pypi = [ packaging ]; 79 htmlparser = [ lxml ]; 80 }; 81 82 passthru.updateScript = nix-update-script { }; 83 84 meta = { 85 description = "New version checker for software"; 86 homepage = "https://github.com/lilydjwg/nvchecker"; 87 changelog = "https://github.com/lilydjwg/nvchecker/releases/tag/v${version}"; 88 license = lib.licenses.mit; 89 maintainers = [ lib.maintainers.mdaniels5757 ]; 90 }; 91}