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.
This commit is contained in:
Sandro Jäckel 2024-08-06 18:01:02 +02:00
parent 0654f81d56
commit a1d5c9d11a
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5

View File

@ -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}" \