summary refs log tree commit diff
path: root/pkgs/os-specific/linux/autosuspend
diff options
context:
space:
mode:
authorAnthony Roussel <anthony@roussel.dev>2023-10-23 22:47:34 +0200
committerAnthony Roussel <anthony@roussel.dev>2023-10-23 22:48:05 +0200
commit0b6b520442871158084c694785807a89e885b9ef (patch)
tree6d2e13e92189c3b20be94f99e7d1bf89fc3d5f04 /pkgs/os-specific/linux/autosuspend
parentfcc32aadf340c002b01efe319a373d6bdb9fe887 (diff)
downloadnixpkgs-0b6b520442871158084c694785807a89e885b9ef.tar
nixpkgs-0b6b520442871158084c694785807a89e885b9ef.tar.gz
nixpkgs-0b6b520442871158084c694785807a89e885b9ef.tar.bz2
nixpkgs-0b6b520442871158084c694785807a89e885b9ef.tar.lz
nixpkgs-0b6b520442871158084c694785807a89e885b9ef.tar.xz
nixpkgs-0b6b520442871158084c694785807a89e885b9ef.tar.zst
nixpkgs-0b6b520442871158084c694785807a89e885b9ef.zip
autosuspend: downgrade tzlocal to 4.3.1
autosuspend is incompatible with tzlocal v5
See https://github.com/regebro/tzlocal#api-change
Diffstat (limited to 'pkgs/os-specific/linux/autosuspend')
-rw-r--r--pkgs/os-specific/linux/autosuspend/default.nix20
1 files changed, 17 insertions, 3 deletions
diff --git a/pkgs/os-specific/linux/autosuspend/default.nix b/pkgs/os-specific/linux/autosuspend/default.nix
index bd5b780f8f7..fc2b2f0c4e3 100644
--- a/pkgs/os-specific/linux/autosuspend/default.nix
+++ b/pkgs/os-specific/linux/autosuspend/default.nix
@@ -3,7 +3,21 @@
 , python3
 }:
 
-python3.pkgs.buildPythonApplication rec {
+let
+  python = python3.override {
+    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";
+          hash = "sha256-7jLvjCCAPBmpbtNmrd09SnKe9jCctcc1mgzC7ut/pGo=";
+        };
+      });
+    };
+  };
+in
+python.pkgs.buildPythonApplication rec {
   pname = "autosuspend";
   version = "6.0.0";
 
@@ -21,7 +35,7 @@ python3.pkgs.buildPythonApplication rec {
       --replace '--cov-config=setup.cfg' ""
   '';
 
-  propagatedBuildInputs = with python3.pkgs; [
+  propagatedBuildInputs = with python.pkgs; [
     dbus-python
     icalendar
     jsonpath-ng
@@ -36,7 +50,7 @@ python3.pkgs.buildPythonApplication rec {
     tzlocal
   ];
 
-  nativeCheckInputs = with python3.pkgs; [
+  nativeCheckInputs = with python.pkgs; [
     freezegun
     pytest-datadir
     pytest-httpserver