From 01e90b2196737ffc6c86db89c3973737b308ecd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 28 Nov 2023 18:17:53 -0800 Subject: [PATCH] autosuspend: update tzlocal override --- pkgs/os-specific/linux/autosuspend/default.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/autosuspend/default.nix b/pkgs/os-specific/linux/autosuspend/default.nix index fc2b2f0c4e38..5abacf966b9e 100644 --- a/pkgs/os-specific/linux/autosuspend/default.nix +++ b/pkgs/os-specific/linux/autosuspend/default.nix @@ -1,5 +1,6 @@ { lib , fetchFromGitHub +, fetchPypi , python3 }: @@ -8,11 +9,16 @@ let packageOverrides = self: super: { # autosuspend is incompatible with tzlocal v5 # See https://github.com/regebro/tzlocal#api-change - tzlocal = super.tzlocal.overridePythonAttrs (prev: { - src = prev.src.override { - version = "4.3.1"; + tzlocal = super.tzlocal.overridePythonAttrs (prev: rec { + version = "4.3.1"; + src = fetchPypi { + inherit (prev) pname; + inherit version; hash = "sha256-7jLvjCCAPBmpbtNmrd09SnKe9jCctcc1mgzC7ut/pGo="; }; + propagatedBuildInputs = with self; [ + pytz-deprecation-shim + ]; }); }; };