uwsgi: fix pythonpath
This commit is contained in:
parent
6038aad312
commit
89ec12be1d
@ -13,16 +13,18 @@
|
|||||||
geoip-mmdb,
|
geoip-mmdb,
|
||||||
}: let
|
}: let
|
||||||
uwsgi-python = uwsgi.override {plugins = ["python3"];};
|
uwsgi-python = uwsgi.override {plugins = ["python3"];};
|
||||||
in
|
pythonEnv =
|
||||||
stdenv.mkDerivation {
|
python3.withPackages
|
||||||
name = "e11sync-backend";
|
|
||||||
propagatedBuildInputs = [
|
|
||||||
(python3.withPackages
|
|
||||||
(ps: [
|
(ps: [
|
||||||
ps.django
|
ps.django
|
||||||
ps.django-compressor
|
ps.django-compressor
|
||||||
ps.geoip2
|
ps.geoip2
|
||||||
]))
|
]);
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "e11sync-backend";
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
pythonEnv
|
||||||
libmaxminddb
|
libmaxminddb
|
||||||
];
|
];
|
||||||
nativeBuildInputs = [makeWrapper];
|
nativeBuildInputs = [makeWrapper];
|
||||||
@ -41,6 +43,7 @@ in
|
|||||||
--chdir $out/app \
|
--chdir $out/app \
|
||||||
--set-default E11SYNC_HTTP_PORT ${toString backendPort} \
|
--set-default E11SYNC_HTTP_PORT ${toString backendPort} \
|
||||||
--add-flags "--plugin ${uwsgi-python}/lib/uwsgi/python3_plugin.so" \
|
--add-flags "--plugin ${uwsgi-python}/lib/uwsgi/python3_plugin.so" \
|
||||||
|
--add-flags "--python-path ${pythonEnv}/lib/${pythonEnv.libPrefix}/site-packages" \
|
||||||
--add-flags "--http-socket 127.0.0.1:${toString backendPort}" \
|
--add-flags "--http-socket 127.0.0.1:${toString backendPort}" \
|
||||||
--add-flags "--wsgi-file e11sync/wsgi.py" \
|
--add-flags "--wsgi-file e11sync/wsgi.py" \
|
||||||
--add-flags --master \
|
--add-flags --master \
|
||||||
|
Loading…
Reference in New Issue
Block a user