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