diff --git a/flake.nix b/flake.nix index d3bd92f..bd811ef 100644 --- 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 index f1d8ac5..e244713 100644 --- 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 new file mode 100644 index 0000000..45fc356 --- /dev/null +++ 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/ +''