paperless-ngx: 2.11.6 -> 2.12.1 (#343643)

This commit is contained in:
Sandro 2024-09-25 17:08:03 +02:00 committed by GitHub
commit 3a000f5976
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -25,13 +25,13 @@
}: }:
let let
version = "2.11.6"; version = "2.12.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "paperless-ngx"; owner = "paperless-ngx";
repo = "paperless-ngx"; repo = "paperless-ngx";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-RNX+KS2h9zrOK8QzeQWH55pkNPTDW4gic2HLG+XXLRg="; hash = "sha256-txqwVGLUel74ObCqwMWSqa4Nd2eDRf0SqAIes5tlMDg=";
}; };
# subpath installation is broken with uvicorn >= 0.26 # subpath installation is broken with uvicorn >= 0.26
@ -76,7 +76,7 @@ let
cd src-ui cd src-ui
''; '';
npmDepsHash = "sha256-ML1Yp3JIMbRF6kVu190ReoY7oDUtUfNkHE7dHF6YUAE="; npmDepsHash = "sha256-hb2z2cPMTN5bHtUldTR5Mvgo4nZL8/S+Uhfis37gF44=";
nativeBuildInputs = [ nativeBuildInputs = [
pkg-config pkg-config
@ -116,16 +116,22 @@ let
in in
python.pkgs.buildPythonApplication rec { python.pkgs.buildPythonApplication rec {
pname = "paperless-ngx"; pname = "paperless-ngx";
format = "other"; pyproject = false;
inherit version src; inherit version src;
postPatch = ''
# pytest-xdist makes the tests flaky
substituteInPlace src/setup.cfg \
--replace-fail "--numprocesses auto --maxprocesses=16" ""
'';
nativeBuildInputs = [ nativeBuildInputs = [
gettext gettext
xorg.lndir xorg.lndir
]; ];
propagatedBuildInputs = with python.pkgs; [ dependencies = with python.pkgs; [
bleach bleach
channels channels
channels-redis channels-redis
@ -192,7 +198,7 @@ python.pkgs.buildPythonApplication rec {
''; '';
installPhase = let installPhase = let
pythonPath = python.pkgs.makePythonPath propagatedBuildInputs; pythonPath = python.pkgs.makePythonPath dependencies;
in '' in ''
runHook preInstall runHook preInstall
@ -203,7 +209,7 @@ python.pkgs.buildPythonApplication rec {
makeWrapper $out/lib/paperless-ngx/src/manage.py $out/bin/paperless-ngx \ makeWrapper $out/lib/paperless-ngx/src/manage.py $out/bin/paperless-ngx \
--prefix PYTHONPATH : "${pythonPath}" \ --prefix PYTHONPATH : "${pythonPath}" \
--prefix PATH : "${path}" --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 PYTHONPATH : "${pythonPath}:$out/lib/paperless-ngx/src" \
--prefix PATH : "${path}" --prefix PATH : "${path}"
@ -225,7 +231,6 @@ python.pkgs.buildPythonApplication rec {
pytest-httpx pytest-httpx
pytest-mock pytest-mock
pytest-rerunfailures pytest-rerunfailures
pytest-xdist
pytestCheckHook pytestCheckHook
]; ];