Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 aiohttp, 4 aresponses, 5 buildPythonPackage, 6 fetchFromGitHub, 7 poetry-core, 8 mashumaro, 9 pytest-asyncio, 10 pytestCheckHook, 11 pythonOlder, 12 syrupy, 13 yarl, 14}: 15 16buildPythonPackage rec { 17 pname = "pvo"; 18 version = "2.1.1"; 19 format = "pyproject"; 20 21 disabled = pythonOlder "3.11"; 22 23 src = fetchFromGitHub { 24 owner = "frenck"; 25 repo = "python-pvoutput"; 26 rev = "refs/tags/v${version}"; 27 hash = "sha256-Js8oPEMxJyWK1E6GDm1xwm2BilnV3WBM6Hibf6oFOKE="; 28 }; 29 30 postPatch = '' 31 # Upstream doesn't set a version for the pyproject.toml 32 substituteInPlace pyproject.toml \ 33 --replace "0.0.0" "${version}" \ 34 --replace "--cov" "" 35 ''; 36 37 nativeBuildInputs = [ poetry-core ]; 38 39 propagatedBuildInputs = [ 40 aiohttp 41 mashumaro 42 yarl 43 ]; 44 45 nativeCheckInputs = [ 46 aresponses 47 pytest-asyncio 48 pytestCheckHook 49 syrupy 50 ]; 51 52 pythonImportsCheck = [ "pvo" ]; 53 54 meta = with lib; { 55 description = "Python module to interact with the PVOutput API"; 56 homepage = "https://github.com/frenck/python-pvoutput"; 57 changelog = "https://github.com/frenck/python-pvoutput/releases/tag/v${version}"; 58 license = licenses.mit; 59 maintainers = with maintainers; [ fab ]; 60 }; 61}