commit 45f5f6fcee0e03184f6f1e2a30370e7a7622d419 (tree)
parent 5c9e5c1d7f2296369ed4a693e0116fe83292a87c
Author: Motiejus Jakštys <motiejus@jakstys.lt>
Date: Wed, 17 Jan 2024 07:54:32 +0200
e11sync: move manifest out of e11sync-static
that way `e11sync-backend` has one less dependency.
Diffstat:
3 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/flake.nix b/flake.nix
@@ -55,12 +55,16 @@
e11sync-static = pkgs.callPackage ./pkgs/e11sync-static.nix {};
+ e11sync-static-manifest = pkgs.callPackage ./pkgs/e11sync-static-manifest.nix {
+ inherit e11sync-static;
+ };
+
e11sync-frontend = pkgs.callPackage ./pkgs/e11sync-frontend.nix {
inherit e11sync-static;
};
e11sync-backend = pkgs.callPackage ./pkgs/e11sync-backend.nix {
- inherit geoip-mmdb e11sync-static;
+ inherit geoip-mmdb e11sync-static-manifest;
};
e11sync-module = import ./modules/e11sync {
diff --git a/pkgs/e11sync-backend.nix b/pkgs/e11sync-backend.nix
@@ -10,7 +10,7 @@
backendPort ? 8002,
databasePath ? null,
geoip-mmdb,
- e11sync-static,
+ e11sync-static-manifest,
}: let
uwsgi-python = uwsgi.override {plugins = ["python3"];};
pythonEnv =
@@ -50,7 +50,7 @@ in
${lib.optionalString (databasePath != null) ''
--set E11SYNC_DATABASE_PATH "${databasePath}" \
''} \
- --set E11SYNC_STATIC_ROOT "${e11sync-static}" \
+ --set E11SYNC_STATIC_ROOT "${e11sync-static-manifest}" \
--set E11SYNC_COMPRESS_OFFLINE 1 \
--set E11SYNC_DEBUG "" \
--set GEOIP_PATH "${geoip-mmdb}" \
diff --git a/pkgs/e11sync-static-manifest.nix b/pkgs/e11sync-static-manifest.nix
@@ -0,0 +1,10 @@
+{
+ runCommand,
+ e11sync-static,
+}:
+runCommand "e11sync-static-manifest" {
+ src = e11sync-static;
+} ''
+ mkdir -p $out/CACHE
+ cp ${e11sync-static}/CACHE/manifest.json $out/CACHE/
+''