From a1d5c9d11af37c06a1bda4894699c3e5dceeb2b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 6 Aug 2024 18:01:02 +0200 Subject: [PATCH] paperless-ngx: change symlink to work with compressDrvWeb Before compressDrvWeb would follow the frontend symlink into the nix store and couldn't write it's file into the directories below the symlink. lndir creates all dirs and then symlinks the actual files into them which allows compressDrvWeb to place the compressed variants next to them. --- pkgs/applications/office/paperless-ngx/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/office/paperless-ngx/default.nix b/pkgs/applications/office/paperless-ngx/default.nix index 391569825b18..be9b11f5da01 100644 --- a/pkgs/applications/office/paperless-ngx/default.nix +++ b/pkgs/applications/office/paperless-ngx/default.nix @@ -21,6 +21,7 @@ , pango , pkg-config , nltk-data +, xorg }: let @@ -121,6 +122,7 @@ python.pkgs.buildPythonApplication rec { nativeBuildInputs = [ gettext + xorg.lndir ]; propagatedBuildInputs = with python.pkgs; [ @@ -194,9 +196,9 @@ python.pkgs.buildPythonApplication rec { in '' runHook preInstall - mkdir -p $out/lib/paperless-ngx + mkdir -p $out/lib/paperless-ngx/static/frontend cp -r {src,static,LICENSE,gunicorn.conf.py} $out/lib/paperless-ngx - ln -s ${frontend}/lib/paperless-ui/frontend $out/lib/paperless-ngx/static/ + lndir -silent ${frontend}/lib/paperless-ui/frontend $out/lib/paperless-ngx/static/frontend chmod +x $out/lib/paperless-ngx/src/manage.py makeWrapper $out/lib/paperless-ngx/src/manage.py $out/bin/paperless-ngx \ --prefix PYTHONPATH : "${pythonPath}" \