@@ -260,8 +260,7 @@ in rec {
261 # An Obelisk project is a reflex-platform project with a predefined layout and role for each component
261 # An Obelisk project is a reflex-platform project with a predefined layout and role for each component
262 project = base: projectDefinition:
262 project = base: projectDefinition:
263− let configPath = base + "/config";
264− projectOut = sys: (getReflexPlatform sys).project (args@{ nixpkgs, ... }:
263+ let projectOut = sys: (getReflexPlatform sys).project (args@{ nixpkgs, ... }:
265 let mkProject = { android ? null #TODO: Better error when missing
264 let mkProject = { android ? null #TODO: Better error when missing
266 , ios ? null #TODO: Better error when missing
265 , ios ? null #TODO: Better error when missing
267 , packages ? {}
266 , packages ? {}
@@ -294,7 +293,21 @@ in rec {
294 privateConfigDirs = ["config/backend"];
293 privateConfigDirs = ["config/backend"];
295 injectableConfig = builtins.filterSource (path: _:
294 injectableConfig = builtins.filterSource (path: _:
296 !(lib.lists.any (x: hasPrefix (toString base + "/" + toString x) (toString path)) privateConfigDirs)
295 !(lib.lists.any (x: hasPrefix (toString base + "/" + toString x) (toString path)) privateConfigDirs)
297+ __android = configPath: {
298+ ${if android == null then null else frontendName} = {
299+ executableName = "frontend";
300+ ${if builtins.pathExists staticFiles then "assets" else null} =
301+ nixpkgs.obeliskExecutableConfig.platforms.android.inject (injectableConfig configPath) processedStatic.symlinked;
297− ) configPath;
304+ __ios = configPath: {
305+ ${if ios == null then null else frontendName} = {
306+ executableName = "frontend";
307+ ${if builtins.pathExists staticFiles then "staticSrc" else null} =
308+ nixpkgs.obeliskExecutableConfig.platforms.ios.inject (injectableConfig configPath) processedStatic.symlinked;
299 inherit shellToolOverrides tools withHoogle;
312 inherit shellToolOverrides tools withHoogle;
300 overrides = totalOverrides;
313 overrides = totalOverrides;
@@ -314,21 +327,9 @@ in rec {
314 commonName
327 commonName
317− android = {
330+ android = __android null;
318− ${if android == null then null else frontendName} = {
319− executableName = "frontend";
320− ${if builtins.pathExists staticFiles then "assets" else null} =
321− nixpkgs.obeliskExecutableConfig.platforms.android.inject injectableConfig processedStatic.symlinked;
324− ios = {
331+ ios = __ios null;
325− ${if ios == null then null else frontendName} = {
326− executableName = "frontend";
327− ${if builtins.pathExists staticFiles then "staticSrc" else null} =
328− nixpkgs.obeliskExecutableConfig.platforms.ios.inject injectableConfig processedStatic.symlinked;
331− passthru = { inherit android ios packages overrides tools shellToolOverrides withHoogle staticFiles staticFilesImpure __closureCompilerOptimizationLevel; };
332+ passthru = { inherit android ios packages overrides tools shellToolOverrides withHoogle staticFiles staticFilesImpure __closureCompilerOptimizationLevel processedStatic __ios __android; };
333 in mkProject (projectDefinition args));
334 in mkProject (projectDefinition args));
334 serverOn = sys: version: serverExe
335 serverOn = sys: version: serverExe