Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 fetchpatch2, 6 7 # build-system 8 poetry-core, 9 10 # dependencies 11 aiohttp, 12 13 # tests 14 home-assistant, 15 pytest-aiohttp, 16 pytest-cov-stub, 17 pytest-homeassistant-custom-component, 18 pytest-timeout, 19 pytestCheckHook, 20 21 # reverse dependencies 22 home-assistant-custom-components, 23}: 24 25buildPythonPackage rec { 26 pname = "hass-web-proxy-lib"; 27 version = "0.0.7"; 28 pyproject = true; 29 30 # no tags on git 31 src = fetchPypi { 32 pname = "hass_web_proxy_lib"; 33 inherit version; 34 hash = "sha256-bhz71tNOpZ+4tSlndS+UbC3w2WW5+dAMtpk7TnnFpuQ="; 35 }; 36 37 patches = [ 38 (fetchpatch2 { 39 name = "add-missing-build-system.patch"; 40 url = "https://github.com/dermotduffy/hass-web-proxy-lib/commit/0eed7a57f503fc552948a45e7f490ddaff711896.patch"; 41 hash = "sha256-ccOdhA0NhlTmdA51sNdB357Xh13E4PsLlvUTU4GQ9jk="; 42 }) 43 ]; 44 45 build-system = [ poetry-core ]; 46 47 dependencies = [ aiohttp ]; 48 49 nativeCheckInputs = [ 50 home-assistant 51 pytest-aiohttp 52 pytest-cov-stub 53 pytest-homeassistant-custom-component 54 pytest-timeout 55 pytestCheckHook 56 ]; 57 58 disabledTests = [ 59 # https://github.com/dermotduffy/hass-web-proxy-lib/issues/65 60 "test_proxy_view_aiohttp_read_error" 61 ]; 62 63 pythonImportsCheck = [ 64 "hass_web_proxy_lib" 65 ]; 66 67 passthru.tests = { 68 inherit (home-assistant-custom-components) frigate; 69 }; 70 71 meta = { 72 description = "Library to proxy web traffic through Home Assistant integrations"; 73 homepage = "https://github.com/dermotduffy/hass-web-proxy-lib"; 74 license = lib.licenses.mit; 75 maintainers = home-assistant-custom-components.frigate.meta.maintainers; 76 }; 77}