diff --git a/pkgs/e11sync.nix b/pkgs/e11sync.nix index 1fa9e89..8181623 100644 --- a/pkgs/e11sync.nix +++ b/pkgs/e11sync.nix @@ -1,5 +1,6 @@ { self, + lib, stdenv, runCommand, makeWrapper, @@ -8,6 +9,7 @@ libmaxminddb, dart-sass, gunicornPort ? 8001, + database-path ? null, geoip-archive, }: stdenv.mkDerivation { @@ -27,6 +29,9 @@ stdenv.mkDerivation { makeWrapper ${python3Packages.gunicorn}/bin/gunicorn $out/bin/e11sync-gunicorn \ --chdir $out/app \ --set-default E11SYNC_HTTP_PORT ${toString gunicornPort} \ + ${lib.optionalString (database-path != null) '' + --set E11SYNC_DATABASE_PATH "${database-path}" \ + ''} \ --set E11SYNC_DEBUG "" \ --set E11SYNC_COMPRESS_OFFLINE 1 \ --set GEOIP_PATH "${geoip-archive}" \