Unverified Commit a1d5c9d1 authored by Sandro Jäckel's avatar Sandro Jäckel
Browse files

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.
parent 0654f81d
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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}" \