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 pytest-asyncio, 9 pytestCheckHook, 10 pythonOlder, 11 yarl, 12}: 13 14buildPythonPackage rec { 15 pname = "gridnet"; 16 version = "5.0.1"; 17 pyproject = true; 18 19 disabled = pythonOlder "3.11"; 20 21 src = fetchFromGitHub { 22 owner = "klaasnicolaas"; 23 repo = "python-gridnet"; 24 rev = "refs/tags/v${version}"; 25 hash = "sha256-HVBUAasK7lFsj/tT0j70x/2w4RJtnHWfX/1XbfKKLf8="; 26 }; 27 28 postPatch = '' 29 substituteInPlace pyproject.toml \ 30 --replace "0.0.0" "${version}" \ 31 --replace "--cov" "" 32 ''; 33 34 nativeBuildInputs = [ poetry-core ]; 35 36 propagatedBuildInputs = [ 37 aiohttp 38 yarl 39 ]; 40 41 nativeCheckInputs = [ 42 aresponses 43 pytest-asyncio 44 pytestCheckHook 45 ]; 46 47 pythonImportsCheck = [ "gridnet" ]; 48 49 meta = with lib; { 50 description = "Asynchronous Python client for NET2GRID devices"; 51 homepage = "https://github.com/klaasnicolaas/python-gridnet"; 52 changelog = "https://github.com/klaasnicolaas/python-gridnet/releases/tag/v${version}"; 53 license = licenses.mit; 54 maintainers = with maintainers; [ dotlambda ]; 55 }; 56}