Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 poetry-core, 8 9 # dependencies 10 aiohttp, 11 12 # tests 13 pytest-asyncio, 14 pytestCheckHook, 15}: 16 17buildPythonPackage rec { 18 pname = "pyopenweathermap"; 19 version = "0.1.1"; 20 pyproject = true; 21 22 src = fetchFromGitHub { 23 owner = "freekode"; 24 repo = "pyopenweathermap"; 25 # https://github.com/freekode/pyopenweathermap/issues/2 26 rev = "refs/tags/v${version}"; 27 hash = "sha256-OGalKlZP4pKKWKypjM5nVesvFAGLgvvRjMWzrEIp+VQ="; 28 }; 29 30 build-system = [ poetry-core ]; 31 32 dependencies = [ aiohttp ]; 33 34 nativeCheckInputs = [ 35 pytest-asyncio 36 pytestCheckHook 37 ]; 38 39 pytestFlagsArray = [ 40 "-m" 41 "'not network'" 42 ]; 43 44 pythonImportsCheck = [ "pyopenweathermap" ]; 45 46 meta = with lib; { 47 description = "Python library for OpenWeatherMap API for Home Assistant"; 48 homepage = "https://github.com/freekode/pyopenweathermap"; 49 license = licenses.mit; 50 maintainers = with maintainers; [ hexa ]; 51 }; 52}