1
Fork 0

backend: make familiar with `CACHE/manifest.json`

This commit is contained in:
Motiejus Jakštys 2024-01-16 23:31:21 +02:00
parent 89ec12be1d
commit 39dd8acd90
2 changed files with 5 additions and 6 deletions

View File

@ -62,7 +62,7 @@
}; };
e11sync-backend = pkgs.callPackage ./pkgs/e11sync-backend.nix { e11sync-backend = pkgs.callPackage ./pkgs/e11sync-backend.nix {
inherit geoip-mmdb; inherit geoip-mmdb e11sync-static;
}; };
in { in {
packages = { packages = {

View File

@ -4,13 +4,13 @@
runCommand, runCommand,
makeWrapper, makeWrapper,
python3, python3,
python3Packages,
libmaxminddb, libmaxminddb,
dart-sass, dart-sass,
uwsgi, uwsgi,
backendPort ? 8002, backendPort ? 8002,
databasePath ? null, databasePath ? null,
geoip-mmdb, geoip-mmdb,
e11sync-static,
}: let }: let
uwsgi-python = uwsgi.override {plugins = ["python3"];}; uwsgi-python = uwsgi.override {plugins = ["python3"];};
pythonEnv = pythonEnv =
@ -50,17 +50,16 @@ in
${lib.optionalString (databasePath != null) '' ${lib.optionalString (databasePath != null) ''
--set E11SYNC_DATABASE_PATH "${databasePath}" \ --set E11SYNC_DATABASE_PATH "${databasePath}" \
''} \ ''} \
--set E11SYNC_DEBUG "" \ --set E11SYNC_STATIC_ROOT "${e11sync-static}" \
--set E11SYNC_COMPRESS_OFFLINE 1 \ --set E11SYNC_COMPRESS_OFFLINE 1 \
--set E11SYNC_DEBUG "" \
--set GEOIP_PATH "${geoip-mmdb}" \ --set GEOIP_PATH "${geoip-mmdb}" \
''; '';
passthru.tests.unit = passthru.tests.unit =
runCommand "e11sync-test" { runCommand "e11sync-test" {
src = ../app; src = ../app;
buildInputs = [ buildInputs = [
python3Packages.django pythonEnv
python3Packages.django-compressor
python3Packages.geoip2
dart-sass dart-sass
]; ];
} '' } ''