diff --git a/nixos/modules/services/misc/paperless.nix b/nixos/modules/services/misc/paperless.nix index c29824ee8345..0a62af95f8f1 100644 --- a/nixos/modules/services/misc/paperless.nix +++ b/nixos/modules/services/misc/paperless.nix @@ -297,7 +297,7 @@ in }; environment = env // { PATH = mkForce pkg.path; - PYTHONPATH = "${pkg.pythonPath}:${pkg}/lib/paperless-ngx/src"; + PYTHONPATH = "${pkg.python.pkgs.makePythonPath pkg.propagatedBuildInputs}:${pkg}/lib/paperless-ngx/src"; }; # Allow the web interface to access the private /tmp directory of the server. # This is required to support uploading files via the web interface. diff --git a/pkgs/applications/office/paperless-ngx/default.nix b/pkgs/applications/office/paperless-ngx/default.nix index a42ec844d115..1deb8e7efe6e 100644 --- a/pkgs/applications/office/paperless-ngx/default.nix +++ b/pkgs/applications/office/paperless-ngx/default.nix @@ -207,11 +207,7 @@ python.pkgs.pythonPackages.buildPythonApplication rec { ''; passthru = { - inherit python; - # PYTHONPATH of all dependencies used by the package - pythonPath = python3.pkgs.makePythonPath propagatedBuildInputs; - inherit path; - + inherit python path; tests = { inherit (nixosTests) paperless; }; };