diff options
| author | Erik Arvstedt <erik.arvstedt@gmail.com> | 2022-09-05 10:12:39 +0200 |
|---|---|---|
| committer | Martin Weinelt <hexa@darmstadt.ccc.de> | 2022-09-05 15:43:34 +0200 |
| commit | 25e107b4438ff50d124506da2e3f3b61640ab135 (patch) | |
| tree | 2b134951cf16ef781506eab2a999a292bd158901 | |
| parent | nixos/paperless: extract variable `pkg` (diff) | |
| download | nixpkgs-25e107b4438ff50d124506da2e3f3b61640ab135.tar.gz | |
paperless: move `PYTHONPATH` definition to module
`paperless-ngx.pythonPath` was incomplete due to the missing paperless-ngx
source, so it had to be amended in the service.
Instead of amending it, define it entirely in the service.
This allows an override of `paperless-ngx.propagatedBuildInputs` to be reflected
in the service's PYTHONPATH.
(cherry picked from commit 783f8f16c16ba47daffff2c6b92a96eb8bb5d363)
| -rw-r--r-- | nixos/modules/services/misc/paperless.nix | 2 | ||||
| -rw-r--r-- | pkgs/applications/office/paperless-ngx/default.nix | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/nixos/modules/services/misc/paperless.nix b/nixos/modules/services/misc/paperless.nix index 8423c203aeb6..0d0a1663eeef 100644 --- a/nixos/modules/services/misc/paperless.nix +++ b/nixos/modules/services/misc/paperless.nix @@ -295,7 +295,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 e92666ff5677..9a8e8228ba8b 100644 --- a/pkgs/applications/office/paperless-ngx/default.nix +++ b/pkgs/applications/office/paperless-ngx/default.nix @@ -179,11 +179,9 @@ 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; }; }; |
