From 39dd8acd908205dde98bfbe71f6092fd295de66f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Tue, 16 Jan 2024 23:31:21 +0200 Subject: [PATCH] backend: make familiar with `CACHE/manifest.json` --- flake.nix | 2 +- pkgs/e11sync-backend.nix | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/flake.nix b/flake.nix index 13cb7eb..641b487 100644 --- a/flake.nix +++ b/flake.nix @@ -62,7 +62,7 @@ }; e11sync-backend = pkgs.callPackage ./pkgs/e11sync-backend.nix { - inherit geoip-mmdb; + inherit geoip-mmdb e11sync-static; }; in { packages = { diff --git a/pkgs/e11sync-backend.nix b/pkgs/e11sync-backend.nix index 49116a2..dc5952a 100644 --- a/pkgs/e11sync-backend.nix +++ b/pkgs/e11sync-backend.nix @@ -4,13 +4,13 @@ runCommand, makeWrapper, python3, - python3Packages, libmaxminddb, dart-sass, uwsgi, backendPort ? 8002, databasePath ? null, geoip-mmdb, + e11sync-static, }: let uwsgi-python = uwsgi.override {plugins = ["python3"];}; pythonEnv = @@ -50,17 +50,16 @@ in ${lib.optionalString (databasePath != null) '' --set E11SYNC_DATABASE_PATH "${databasePath}" \ ''} \ - --set E11SYNC_DEBUG "" \ + --set E11SYNC_STATIC_ROOT "${e11sync-static}" \ --set E11SYNC_COMPRESS_OFFLINE 1 \ + --set E11SYNC_DEBUG "" \ --set GEOIP_PATH "${geoip-mmdb}" \ ''; passthru.tests.unit = runCommand "e11sync-test" { src = ../app; buildInputs = [ - python3Packages.django - python3Packages.django-compressor - python3Packages.geoip2 + pythonEnv dart-sass ]; } ''