uwsgi: move package overrides to e11sync-backend
This commit is contained in:
parent
74efa197b5
commit
d3c5d73198
@ -63,7 +63,6 @@
|
|||||||
|
|
||||||
e11sync-backend = pkgs.callPackage ./pkgs/e11sync-backend.nix {
|
e11sync-backend = pkgs.callPackage ./pkgs/e11sync-backend.nix {
|
||||||
inherit geoip-mmdb;
|
inherit geoip-mmdb;
|
||||||
uwsgi = pkgs.uwsgi.override {plugins = ["python3"];};
|
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
packages = {
|
packages = {
|
||||||
|
@ -11,7 +11,9 @@
|
|||||||
backendPort ? 8002,
|
backendPort ? 8002,
|
||||||
database-path ? null,
|
database-path ? null,
|
||||||
geoip-mmdb,
|
geoip-mmdb,
|
||||||
}:
|
}: let
|
||||||
|
uwsgi-python = uwsgi.override {plugins = ["python3"];};
|
||||||
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "e11sync-backend";
|
name = "e11sync-backend";
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
@ -32,10 +34,10 @@ stdenv.mkDerivation {
|
|||||||
makeWrapper $out/app/manage.py $out/bin/e11sync \
|
makeWrapper $out/app/manage.py $out/bin/e11sync \
|
||||||
--set GEOIP_PATH "${geoip-mmdb}"
|
--set GEOIP_PATH "${geoip-mmdb}"
|
||||||
|
|
||||||
makeWrapper ${uwsgi}/bin/uwsgi $out/bin/e11sync-backend \
|
makeWrapper ${uwsgi-python}/bin/uwsgi $out/bin/e11sync-backend \
|
||||||
--chdir $out/app \
|
--chdir $out/app \
|
||||||
--set-default E11SYNC_HTTP_PORT ${toString backendPort} \
|
--set-default E11SYNC_HTTP_PORT ${toString backendPort} \
|
||||||
--add-flags "--plugin ${uwsgi}/lib/uwsgi/python3_plugin.so" \
|
--add-flags "--plugin ${uwsgi-python}/lib/uwsgi/python3_plugin.so" \
|
||||||
--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