about summary refs log tree commit diff
path: root/pkgs/applications/misc
diff options
context:
space:
mode:
authorflorian on nixos (Florian Brandes) <florian.brandes@posteo.de>2022-02-14 08:31:22 +0100
committerflorian on nixos (Florian Brandes) <florian.brandes@posteo.de>2022-02-14 12:40:07 +0100
commit6833b1a1a76752de5d9d2ee207255afa7d66740b (patch)
tree00ed4e4b62fee277c75a571e9f77185e4d61bf78 /pkgs/applications/misc
parentda210873dbb76e13c088c621f41253a32efee4f6 (diff)
ocoprint: fix build due to recent python upgrades
Signed-off-by: florian on nixos (Florian Brandes) <florian.brandes@posteo.de>
Diffstat (limited to 'pkgs/applications/misc')
-rw-r--r--pkgs/applications/misc/octoprint/default.nix125
1 files changed, 88 insertions, 37 deletions
diff --git a/pkgs/applications/misc/octoprint/default.nix b/pkgs/applications/misc/octoprint/default.nix
index 84565a5dff2fe..eda78c54a10ee 100644
--- a/pkgs/applications/misc/octoprint/default.nix
+++ b/pkgs/applications/misc/octoprint/default.nix
@@ -6,24 +6,24 @@
 , substituteAll
 , nix-update-script
   # To include additional plugins, pass them here as an overlay.
-, packageOverrides ? self: super: {}
+, packageOverrides ? self: super: { }
 }:
 let
   mkOverride = attrname: version: sha256:
-  self: super: {
-    ${attrname} = super.${attrname}.overridePythonAttrs (
-      oldAttrs: {
-        inherit version;
-        src = oldAttrs.src.override {
-          inherit version sha256;
-        };
-      }
-    );
-  };
+    self: super: {
+      ${attrname} = super.${attrname}.overridePythonAttrs (
+        oldAttrs: {
+          inherit version;
+          src = oldAttrs.src.override {
+            inherit version sha256;
+          };
+        }
+      );
+    };
 
   py = python3.override {
     self = py;
-    packageOverrides = lib.foldr lib.composeExtensions (self: super: {}) (
+    packageOverrides = lib.foldr lib.composeExtensions (self: super: { }) (
       [
         # the following dependencies are non trivial to update since later versions introduce backwards incompatible
         # changes that might affect plugins, or due to other observed problems
@@ -57,7 +57,7 @@ let
                 inherit version;
                 sha256 = "6c80b1e5ad3665290ea39320b91e1be1e0d5f60652b964a3070216de83d2e47c";
               };
-              doCheck= false;
+              doCheck = false;
             });
           }
         )
@@ -92,7 +92,7 @@ let
                   pysocks
                 ];
                 disabledTests = [
-                  "testConnect"  # requires network access
+                  "testConnect" # requires network access
                 ];
               }
             );
@@ -154,10 +154,60 @@ let
               disabledTests = [
                 "test_apply_simulates_delivery_info"
                 "test_auto_enabling_integrations_catches_import_error"
+                "test_leaks"
               ];
               disabledTestPaths = [
                 # Don't test integrations
                 "tests/integrations"
+                # test crashes on aarch64
+                "tests/test_transport.py"
+              ];
+            });
+          }
+        )
+
+        # Octoprint fails due to a newly added test in pytest-httpbin
+        # see https://github.com/NixOS/nixpkgs/issues/159864
+        (
+          self: super: {
+            pytest-httpbin = super.pytest-httpbin.overridePythonAttrs (oldAttrs: rec {
+              disabledTests = [
+                "test_redirect_location_is_https_for_secure_server"
+              ];
+            });
+          }
+        )
+
+        # All test fail on aarch64
+        (
+          self: super: {
+            azure-core = super.azure-core.overridePythonAttrs (oldAttrs: rec {
+              doCheck = stdenv.buildPlatform == "x86_64-linux";
+            });
+          }
+        )
+
+        # needs network
+        (
+          self: super: {
+            falcon = super.falcon.overridePythonAttrs (oldAttrs: rec {
+              #pytestFlagsArray = [ "-W ignore::DeprecationWarning" ];
+              disabledTestPaths = oldAttrs.disabledTestPaths ++ [
+                "tests/asgi/test_asgi_servers.py"
+              ];
+            });
+          }
+        )
+
+        # update broke some tests
+        (
+          self: super: {
+            sanic = super.sanic.overridePythonAttrs (oldAttrs: rec {
+              disabledTestPaths = oldAttrs.disabledTestPaths ++ [
+                "test_cli.py"
+                "test_cookies.py"
+                # requires network
+                "test_worker.py"
               ];
             });
           }
@@ -302,29 +352,30 @@ let
                 })
               ];
 
-              postPatch = let
-                ignoreVersionConstraints = [
-                  "cachelib"
-                  "colorlog"
-                  "emoji"
-                  "immutabledict"
-                  "PyYAML"
-                  "sarge"
-                  "sentry-sdk"
-                  "watchdog"
-                  "wrapt"
-                  "zeroconf"
-                ];
-              in
+              postPatch =
+                let
+                  ignoreVersionConstraints = [
+                    "cachelib"
+                    "colorlog"
+                    "emoji"
+                    "immutabledict"
+                    "PyYAML"
+                    "sarge"
+                    "sentry-sdk"
+                    "watchdog"
+                    "wrapt"
+                    "zeroconf"
+                  ];
+                in
                 ''
-                  sed -r -i \
-                    ${lib.concatStringsSep "\n" (
-                  map (
-                    e:
-                      ''-e 's@${e}[<>=]+.*@${e}",@g' \''
-                  ) ignoreVersionConstraints
-                )}
-                    setup.py
+                    sed -r -i \
+                      ${lib.concatStringsSep "\n" (
+                    map (
+                      e:
+                        ''-e 's@${e}[<>=]+.*@${e}",@g' \''
+                    ) ignoreVersionConstraints
+                  )}
+                      setup.py
                 '';
 
               dontUseSetuptoolsCheck = true;
@@ -360,4 +411,4 @@ let
     );
   };
 in
-  with py.pkgs; toPythonApplication octoprint
+with py.pkgs; toPythonApplication octoprint