diff options
Diffstat (limited to 'pkgs/applications/office/paperless-ngx/default.nix')
-rw-r--r-- | pkgs/applications/office/paperless-ngx/default.nix | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/pkgs/applications/office/paperless-ngx/default.nix b/pkgs/applications/office/paperless-ngx/default.nix index 9e8f2e6f6a34..b0e51f5a8e54 100644 --- a/pkgs/applications/office/paperless-ngx/default.nix +++ b/pkgs/applications/office/paperless-ngx/default.nix @@ -25,13 +25,13 @@ }: let - version = "2.11.6"; + version = "2.12.1"; src = fetchFromGitHub { owner = "paperless-ngx"; repo = "paperless-ngx"; rev = "refs/tags/v${version}"; - hash = "sha256-RNX+KS2h9zrOK8QzeQWH55pkNPTDW4gic2HLG+XXLRg="; + hash = "sha256-txqwVGLUel74ObCqwMWSqa4Nd2eDRf0SqAIes5tlMDg="; }; # subpath installation is broken with uvicorn >= 0.26 @@ -76,18 +76,18 @@ let cd src-ui ''; - npmDepsHash = "sha256-ML1Yp3JIMbRF6kVu190ReoY7oDUtUfNkHE7dHF6YUAE="; + npmDepsHash = "sha256-hb2z2cPMTN5bHtUldTR5Mvgo4nZL8/S+Uhfis37gF44="; nativeBuildInputs = [ pkg-config python3 - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild ]; buildInputs = [ pango - ] ++ lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ giflib darwin.apple_sdk.frameworks.CoreText ]; @@ -116,16 +116,22 @@ let in python.pkgs.buildPythonApplication rec { pname = "paperless-ngx"; - format = "other"; + pyproject = false; inherit version src; + postPatch = '' + # pytest-xdist makes the tests flaky + substituteInPlace src/setup.cfg \ + --replace-fail "--numprocesses auto --maxprocesses=16" "" + ''; + nativeBuildInputs = [ gettext xorg.lndir ]; - propagatedBuildInputs = with python.pkgs; [ + dependencies = with python.pkgs; [ bleach channels channels-redis @@ -192,7 +198,7 @@ python.pkgs.buildPythonApplication rec { ''; installPhase = let - pythonPath = python.pkgs.makePythonPath propagatedBuildInputs; + pythonPath = python.pkgs.makePythonPath dependencies; in '' runHook preInstall @@ -203,7 +209,7 @@ python.pkgs.buildPythonApplication rec { makeWrapper $out/lib/paperless-ngx/src/manage.py $out/bin/paperless-ngx \ --prefix PYTHONPATH : "${pythonPath}" \ --prefix PATH : "${path}" - makeWrapper ${python.pkgs.celery}/bin/celery $out/bin/celery \ + makeWrapper ${lib.getExe python.pkgs.celery} $out/bin/celery \ --prefix PYTHONPATH : "${pythonPath}:$out/lib/paperless-ngx/src" \ --prefix PATH : "${path}" @@ -225,7 +231,6 @@ python.pkgs.buildPythonApplication rec { pytest-httpx pytest-mock pytest-rerunfailures - pytest-xdist pytestCheckHook ]; @@ -254,7 +259,7 @@ python.pkgs.buildPythonApplication rec { "test_rtl_language_detection" ]; - doCheck = !stdenv.isDarwin; + doCheck = !stdenv.hostPlatform.isDarwin; passthru = { inherit python path frontend tesseract5; |