3
0
Fork 0
forked from mirrors/nixpkgs

paperless: Expose python environment in passthru

This allows adding more python dependencies through overrides.
This commit is contained in:
Martin Weinelt 2022-09-04 16:01:45 +02:00
parent 2d257f8101
commit 73e10d9d5a
No known key found for this signature in database
GPG key ID: 87C1E9888F856759

View file

@ -16,7 +16,7 @@
let
# Use specific package versions required by paperless-ngx
py = python3.override {
python = python3.override {
packageOverrides = self: super: {
django = super.django_4;
@ -51,7 +51,7 @@ let
path = lib.makeBinPath [ ghostscript imagemagick jbig2enc optipng pngquant qpdf tesseract4 unpaper ];
in
py.pkgs.pythonPackages.buildPythonApplication rec {
python.pkgs.pythonPackages.buildPythonApplication rec {
pname = "paperless-ngx";
version = "1.8.0";
@ -63,7 +63,7 @@ py.pkgs.pythonPackages.buildPythonApplication rec {
format = "other";
propagatedBuildInputs = with py.pkgs.pythonPackages; [
propagatedBuildInputs = with python.pkgs.pythonPackages; [
aioredis
arrow
asgiref
@ -169,7 +169,7 @@ py.pkgs.pythonPackages.buildPythonApplication rec {
# Compile manually because `pythonRecompileBytecodeHook` only works for
# files in `python.sitePackages`
postBuild = ''
${py.interpreter} -OO -m compileall src
${python.interpreter} -OO -m compileall src
'';
installPhase = ''
@ -181,7 +181,7 @@ py.pkgs.pythonPackages.buildPythonApplication rec {
--prefix PATH : "${path}"
'';
checkInputs = with py.pkgs.pythonPackages; [
checkInputs = with python.pkgs.pythonPackages; [
pytest-django
pytest-env
pytest-sugar
@ -207,6 +207,7 @@ py.pkgs.pythonPackages.buildPythonApplication rec {
'';
passthru = {
inherit python;
# PYTHONPATH of all dependencies used by the package
pythonPath = python3.pkgs.makePythonPath propagatedBuildInputs;
inherit path;