about summary refs log tree commit diff
path: root/pkgs/applications/office/paperless-ngx/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/office/paperless-ngx/default.nix')
-rw-r--r--pkgs/applications/office/paperless-ngx/default.nix42
1 files changed, 17 insertions, 25 deletions
diff --git a/pkgs/applications/office/paperless-ngx/default.nix b/pkgs/applications/office/paperless-ngx/default.nix
index 403e3d0d88a69..c31436edef8cf 100644
--- a/pkgs/applications/office/paperless-ngx/default.nix
+++ b/pkgs/applications/office/paperless-ngx/default.nix
@@ -20,20 +20,6 @@ let
     packageOverrides = self: super: {
       django = super.django_4;
 
-      # use paperless-ngx version of django-q
-      # see https://github.com/paperless-ngx/paperless-ngx/pull/1014
-      django-q = super.django-q.overridePythonAttrs (oldAttrs: {
-        src = fetchFromGitHub {
-          owner = "paperless-ngx";
-          repo = "django-q";
-          hash = "sha256-alu7tZwUn77xhUF9c/aGmwRwO//mR/FucXjvXUl/6ek=";
-          rev = "8b5289d8caf36f67fb99448e76ead20d5b498c1b";
-        };
-        # due to paperless-ngx modification of the pyproject.toml file
-        # the patch is not needed any more
-        patches = [ ];
-      });
-
       aioredis = super.aioredis.overridePythonAttrs (oldAttrs: rec {
         version = "1.3.1";
         src = oldAttrs.src.override {
@@ -93,12 +79,12 @@ let
 in
 python.pkgs.pythonPackages.buildPythonApplication rec {
   pname = "paperless-ngx";
-  version = "1.9.2";
+  version = "1.10.2";
 
-  # Fetch the release tarball instead of a git ref because it contains the prebuilt fontend
+  # Fetch the release tarball instead of a git ref because it contains the prebuilt frontend
   src = fetchurl {
     url = "https://github.com/paperless-ngx/paperless-ngx/releases/download/v${version}/${pname}-v${version}.tar.xz";
-    hash = "sha256-fafjVXRfzFrINzI/Ivfm1VY4YpemHkHwThBP54XoXM4=";
+    hash = "sha256-uOrRHHNqIYsDbzKcA7EsYZjadpLyAB4Ks+PU+BNsTWE=";
   };
 
   format = "other";
@@ -112,6 +98,7 @@ python.pkgs.pythonPackages.buildPythonApplication rec {
     autobahn
     automat
     blessed
+    celery
     certifi
     cffi
     channels-redis
@@ -124,11 +111,11 @@ python.pkgs.pythonPackages.buildPythonApplication rec {
     cryptography
     daphne
     dateparser
+    django-celery-results
     django-cors-headers
     django-extensions
     django-filter
     django-picklefield
-    django-q
     django
     djangorestframework
     filelock
@@ -171,6 +158,7 @@ python.pkgs.pythonPackages.buildPythonApplication rec {
     pytz
     pyyaml
     pyzbar
+    rapidfuzz
     redis
     regex
     reportlab
@@ -199,13 +187,6 @@ python.pkgs.pythonPackages.buildPythonApplication rec {
     zope_interface
   ];
 
-  # paperless-ngx includes the bundled django-q version. This will
-  # conflict with the tests and is not needed since we overrode the
-  # django-q version with the paperless-ngx version
-  postPatch = ''
-    rm -rf src/django-q
-  '';
-
   # Compile manually because `pythonRecompileBytecodeHook` only works for
   # files in `python.sitePackages`
   postBuild = ''
@@ -246,8 +227,19 @@ python.pkgs.pythonPackages.buildPythonApplication rec {
     # Disable unneeded code coverage test
     substituteInPlace src/setup.cfg \
       --replace "--cov --cov-report=html" ""
+    # OCR on NixOS recognizes the space in the picture, upstream CI doesn't.
+    # See https://github.com/paperless-ngx/paperless-ngx/pull/2216
+    substituteInPlace src/paperless_tesseract/tests/test_parser.py \
+      --replace "this is awebp document" "this is a webp document"
   '';
 
+  disabledTests = [
+    # FileNotFoundError(2, 'No such file or directory'): /build/tmp...
+    "test_script_with_output"
+    # AssertionError: 10 != 4 (timezone/time issue)
+    # Due to getting local time from modification date in test_consumer.py
+    "testNormalOperation"
+  ];
 
   passthru = {
     inherit python path;