about summary refs log tree commit diff
path: root/pkgs/applications/office/paperless-ngx
diff options
context:
space:
mode:
authorLeona Maroni <dev@leona.is>2024-03-24 23:56:26 +0100
committerLeona Maroni <dev@leona.is>2024-03-24 23:56:26 +0100
commiteccde4643b8ea82e11fd45f79ff5b912a871f09c (patch)
tree95e75fd5f7aa2e39f8a8383cb3cf744fc386d35c /pkgs/applications/office/paperless-ngx
parent44d0940ea560dee511026a53f0e2e2cde489b4d4 (diff)
paperless-ngx: fix subpath installation
This fixates uvicorn to fix issues when using a subpath
Diffstat (limited to 'pkgs/applications/office/paperless-ngx')
-rw-r--r--pkgs/applications/office/paperless-ngx/default.nix18
1 files changed, 17 insertions, 1 deletions
diff --git a/pkgs/applications/office/paperless-ngx/default.nix b/pkgs/applications/office/paperless-ngx/default.nix
index 257ee3250e505..87dbacda35ffe 100644
--- a/pkgs/applications/office/paperless-ngx/default.nix
+++ b/pkgs/applications/office/paperless-ngx/default.nix
@@ -31,7 +31,23 @@ let
     hash = "sha256-M1CnB1adk02lJuFsm0zzjSx/l9hKHJMt1Wh2a5Xtdyg=";
   };
 
-  python = python3;
+  # subpath installation is broken with uvicorn >= 0.26
+  # https://github.com/NixOS/nixpkgs/issues/298719
+  # https://github.com/paperless-ngx/paperless-ngx/issues/5494
+  python = python3.override {
+    packageOverrides = self: super: {
+      uvicorn = super.uvicorn.overridePythonAttrs (oldAttrs: {
+        version = "0.25.0";
+        src = fetchFromGitHub {
+          owner = "encode";
+          repo = "uvicorn";
+          rev = "0.25.0";
+          hash = "sha256-ng98DTw49zyFjrPnEwfnPfONyjKKZYuLl0qduxSppYk=";
+        };
+      });
+    };
+  };
+
 
   path = lib.makeBinPath [
     ghostscript