about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2022-05-30 23:08:34 +0200
committerGitHub <noreply@github.com>2022-05-30 23:08:34 +0200
commitc10e14acc786808d4bd07aabcbe0adc15af13ac0 (patch)
treeff8d4213ca389189a277e88cf26d3410c67e9a7a /pkgs
parenta85b3b8c74ed4e65a1438033856858772a0c3279 (diff)
parent138a94228d1019889b437ff7d30c9450078468f8 (diff)
downloadnixlib-c10e14acc786808d4bd07aabcbe0adc15af13ac0.tar
nixlib-c10e14acc786808d4bd07aabcbe0adc15af13ac0.tar.gz
nixlib-c10e14acc786808d4bd07aabcbe0adc15af13ac0.tar.bz2
nixlib-c10e14acc786808d4bd07aabcbe0adc15af13ac0.tar.lz
nixlib-c10e14acc786808d4bd07aabcbe0adc15af13ac0.tar.xz
nixlib-c10e14acc786808d4bd07aabcbe0adc15af13ac0.tar.zst
nixlib-c10e14acc786808d4bd07aabcbe0adc15af13ac0.zip
Merge pull request #170781 from erikarvstedt/papgerless-ngx-1.7.0
paperless-ngx: 1.6.0 -> 1.7.1
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/office/paperless-ngx/default.nix21
-rw-r--r--pkgs/development/python-modules/pdf2image/default.nix7
2 files changed, 20 insertions, 8 deletions
diff --git a/pkgs/applications/office/paperless-ngx/default.nix b/pkgs/applications/office/paperless-ngx/default.nix
index 2b07b9bd47b3..18b22217004f 100644
--- a/pkgs/applications/office/paperless-ngx/default.nix
+++ b/pkgs/applications/office/paperless-ngx/default.nix
@@ -1,6 +1,5 @@
 { lib
 , fetchurl
-, fetchpatch
 , nixosTests
 , python3
 , ghostscript
@@ -15,11 +14,16 @@
 }:
 
 let
+  # Use specific package versions required by paperless-ngx
   py = python3.override {
     packageOverrides = self: super: {
-      django = super.django_3;
+      django = super.django_4;
+
+      # django-extensions 3.1.5 is required, but its tests are incompatible with Django 4
+      django-extensions = super.django-extensions.overridePythonAttrs (_: {
+        doCheck = false;
+      });
 
-      # Incompatible with aioredis 2
       aioredis = super.aioredis.overridePythonAttrs (oldAttrs: rec {
         version = "1.3.1";
         src = oldAttrs.src.override {
@@ -34,11 +38,12 @@ let
 in
 py.pkgs.pythonPackages.buildPythonApplication rec {
   pname = "paperless-ngx";
-  version = "1.6.0";
+  version = "1.7.1";
 
+  # Fetch the release tarball instead of a git ref because it contains the prebuilt fontend
   src = fetchurl {
-    url = "https://github.com/paperless-ngx/paperless-ngx/releases/download/ngx-${version}/${pname}-${version}.tar.xz";
-    sha256 = "07mrxbwahkm00n9nvssd6d13p80w333g84cd38bzp0l34nzim5zl";
+    url = "https://github.com/paperless-ngx/paperless-ngx/releases/download/v${version}/${pname}-v${version}.tar.xz";
+    hash = "sha256-8vx4hvbIqaChjPyS8Q0ar2bz/pLzEdxoF7P2gBEeFzc=";
   };
 
   format = "other";
@@ -92,6 +97,7 @@ py.pkgs.pythonPackages.buildPythonApplication rec {
     numpy
     ocrmypdf
     pathvalidate
+    pdf2image
     pdfminer-six
     pikepdf
     pillow
@@ -109,6 +115,7 @@ py.pkgs.pythonPackages.buildPythonApplication rec {
     python-magic
     pytz
     pyyaml
+    pyzbar
     redis
     regex
     reportlab
@@ -189,6 +196,6 @@ py.pkgs.pythonPackages.buildPythonApplication rec {
     description = "A supercharged version of paperless: scan, index, and archive all of your physical documents";
     homepage = "https://paperless-ngx.readthedocs.io/en/latest/";
     license = licenses.gpl3Only;
-    maintainers = with maintainers; [ lukegb ];
+    maintainers = with maintainers; [ lukegb gador earvstedt ];
   };
 }
diff --git a/pkgs/development/python-modules/pdf2image/default.nix b/pkgs/development/python-modules/pdf2image/default.nix
index c3c0538bf503..f2ed6e7a297c 100644
--- a/pkgs/development/python-modules/pdf2image/default.nix
+++ b/pkgs/development/python-modules/pdf2image/default.nix
@@ -4,13 +4,18 @@ buildPythonPackage rec {
   pname = "pdf2image";
   version = "1.16.0";
 
-  propagatedBuildInputs = [ pillow poppler_utils ];
+  propagatedBuildInputs = [ pillow ];
 
   src = fetchPypi {
     inherit pname version;
     sha256 = "d58ed94d978a70c73c2bb7fdf8acbaf2a7089c29ff8141be5f45433c0c4293bb";
   };
 
+  postPatch = ''
+    # Only replace first match in file
+    sed -i '0,/poppler_path=None/s||poppler_path="${poppler_utils}/bin"|' pdf2image/pdf2image.py
+  '';
+
   meta = with lib; {
     description = "A python module that wraps the pdftoppm utility to convert PDF to PIL Image object";
     homepage = "https://github.com/Belval/pdf2image";