about summary refs log tree commit diff
path: root/pkgs/applications/misc/etesync-dav
diff options
context:
space:
mode:
authorCody Hiar <cody@hiar.ca>2023-02-18 10:35:01 -0700
committerCody Hiar <cody@hiar.ca>2023-02-21 15:25:35 -0700
commitd9e8d5d8c199c8c88729583bfd4b483ad18f4aee (patch)
tree94a8864ac5b0de173add2997478e8c3361bf7bbe /pkgs/applications/misc/etesync-dav
parent5eb613962603213f9cb86fe980ac703c76c59176 (diff)
etesync-dav: fix broken dependancies
Related #206852

This was failing due to newer versions of Flask requiring newer versions
of werkzeug. I referenced:

https://github.com/etesync/etesync-dav/blob/master/requirements.txt

to downgrade flake and use the current wtforms. The issue with using
flask-wtf==0.15.1 and wtforms==3.0.1 is there are tests in flask-wtf
that reference import paths that are removed in wtforms 3.0.0:

https://github.com/wtforms/flask-wtf/blob/v0.15.1/tests/test_form.py#L5

So I've just skipped the tests that failed. Once everything compiled I
tried running the binary which complained:

ModuleNotFoundError: No module named 'pkg_resources'

So I added setuptools to the propagatedBuildInputs. After I was able to
render the page at http://localhost:37358/.web/add/
Diffstat (limited to 'pkgs/applications/misc/etesync-dav')
-rw-r--r--pkgs/applications/misc/etesync-dav/default.nix23
1 files changed, 13 insertions, 10 deletions
diff --git a/pkgs/applications/misc/etesync-dav/default.nix b/pkgs/applications/misc/etesync-dav/default.nix
index 5ab3694728ad1..32319d08b6a98 100644
--- a/pkgs/applications/misc/etesync-dav/default.nix
+++ b/pkgs/applications/misc/etesync-dav/default.nix
@@ -7,6 +7,13 @@
 let
   python = python3.override {
     packageOverrides = self: super: {
+      flask = super.flask.overridePythonAttrs (old: rec {
+        version = "2.0.3";
+        src = old.src.override {
+          inherit version;
+          sha256 = "sha256-4RIMIoyi9VO0cN9KX6knq2YlhGdSYGmYGz6wqRkCaH0=";
+        };
+      });
       flask-wtf = super.flask-wtf.overridePythonAttrs (old: rec {
         version = "0.15.1";
         src = old.src.override {
@@ -16,6 +23,11 @@ let
         disabledTests = [
           "test_outside_request"
         ];
+        disabledTestPaths = [
+          "tests/test_form.py"
+          "tests/test_html5.py"
+        ];
+        patches = [ ];
       });
       werkzeug = super.werkzeug.overridePythonAttrs (old: rec {
         version = "2.0.3";
@@ -24,16 +36,6 @@ let
           sha256 = "b863f8ff057c522164b6067c9e28b041161b4be5ba4d0daceeaa50a163822d3c";
         };
       });
-      wtforms = super.wtforms.overridePythonAttrs (old: rec {
-        version = "2.3.3";
-        src = old.src.override {
-          inherit version;
-          sha256 = "81195de0ac94fbc8368abbaf9197b88c4f3ffd6c2719b5bf5fc9da744f3d829c";
-        };
-        checkPhase = ''
-          ${self.python.interpreter} tests/runtests.py
-        '';
-      });
     };
   };
 in python.pkgs.buildPythonApplication rec {
@@ -52,6 +54,7 @@ in python.pkgs.buildPythonApplication rec {
     flask
     flask-wtf
     msgpack
+    setuptools
     (python.pkgs.toPythonModule (radicale3.override { python3 = python; }))
     requests
   ] ++ requests.optional-dependencies.socks;