nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at r-updates 43 lines 979 B view raw
1{ 2 lib, 3 aiohttp, 4 buildPythonPackage, 5 fetchFromGitHub, 6 setuptools, 7}: 8 9buildPythonPackage rec { 10 pname = "aiohwenergy"; 11 version = "0.8.0"; 12 pyproject = true; 13 14 src = fetchFromGitHub { 15 owner = "DCSBL"; 16 repo = "aiohwenergy"; 17 tag = version; 18 hash = "sha256-WfkwIxyDzLNzhWNWST/V3iN9Bhu2oXDwGiA5UXCq5ho="; 19 }; 20 21 postPatch = '' 22 # Replace async_timeout with asyncio.timeout 23 substituteInPlace aiohwenergy/hwenergy.py \ 24 --replace-fail "async_timeout" "asyncio" 25 ''; 26 27 build-system = [ setuptools ]; 28 29 dependencies = [ aiohttp ]; 30 31 # Project has no tests 32 doCheck = false; 33 34 pythonImportsCheck = [ "aiohwenergy" ]; 35 36 meta = { 37 description = "Python library to interact with the HomeWizard Energy devices API"; 38 homepage = "https://github.com/DCSBL/aiohwenergy"; 39 changelog = "https://github.com/DCSBL/aiohwenergy/releases/tag/${src.tag}"; 40 license = lib.licenses.asl20; 41 maintainers = with lib.maintainers; [ fab ]; 42 }; 43}