Merge pull request #263023 from anthonyroussel/bugfix/autosupend

autosuspend: fix build

authored by Mario Rodas and committed by GitHub 0449ec32 84a877ed

+31 -16
+31 -16
pkgs/os-specific/linux/autosuspend/default.nix
··· 3 3 , python3 4 4 }: 5 5 6 - python3.pkgs.buildPythonApplication rec { 6 + let 7 + python = python3.override { 8 + packageOverrides = self: super: { 9 + # autosuspend is incompatible with tzlocal v5 10 + # See https://github.com/regebro/tzlocal#api-change 11 + tzlocal = super.tzlocal.overridePythonAttrs (prev: { 12 + src = prev.src.override { 13 + version = "4.3.1"; 14 + hash = "sha256-7jLvjCCAPBmpbtNmrd09SnKe9jCctcc1mgzC7ut/pGo="; 15 + }; 16 + }); 17 + }; 18 + }; 19 + in 20 + python.pkgs.buildPythonApplication rec { 7 21 pname = "autosuspend"; 8 22 version = "6.0.0"; 9 23 ··· 21 35 --replace '--cov-config=setup.cfg' "" 22 36 ''; 23 37 24 - propagatedBuildInputs = with python3.pkgs; [ 38 + propagatedBuildInputs = with python.pkgs; [ 39 + dbus-python 40 + icalendar 41 + jsonpath-ng 42 + lxml 43 + mpd2 25 44 portalocker 26 45 psutil 27 - dbus-python 46 + python-dateutil 47 + pytz 48 + requests 49 + requests-file 50 + tzlocal 28 51 ]; 29 52 30 - nativeCheckInputs = with python3.pkgs; [ 53 + nativeCheckInputs = with python.pkgs; [ 54 + freezegun 55 + pytest-datadir 56 + pytest-httpserver 57 + pytest-mock 31 58 pytestCheckHook 32 59 python-dbusmock 33 - pytest-httpserver 34 - dateutils 35 - freezegun 36 - pytest-mock 37 - requests 38 - requests-file 39 - icalendar 40 - tzlocal 41 - jsonpath-ng 42 - mpd2 43 - lxml 44 - pytest-datadir 45 60 ]; 46 61 47 62 # Disable tests that need root