@@ -239,18 +239,17 @@ in rec {
239239 };
240240 };
241241
242− serverExe = backend: frontend: assets: config: optimizationLevel: version:
242+ serverExe = backend: frontend: assets: optimizationLevel: version:
243243 pkgs.runCommand "serverExe" {} ''
244244 mkdir $out
245245 set -eux
246246 ln -s "${haskellLib.justStaticExecutables backend}"/bin/* $out/
247247 ln -s "${mkAssets assets}" $out/static.assets
248− cp -r ${config} $out/config
249248 ln -s ${mkAssets (compressedJs frontend optimizationLevel)} $out/frontend.jsexe.assets
250249 echo ${version} > $out/version
251250 '';
252251
253− server = { exe, hostName, adminEmail, routeHost, enableHttps, config, version }@args:
252+ server = { exe, hostName, adminEmail, routeHost, enableHttps, version }@args:
254253 let
255254 nixos = import (pkgs.path + /nixos);
256255 in nixos {
@@ -266,8 +265,7 @@ in rec {
266265
267266 # An Obelisk project is a reflex-platform project with a predefined layout and role for each component
268267 project = base: projectDefinition:
269− let configPath = base + "/config";
270− projectOut = sys: (getReflexPlatform sys).project (args@{ nixpkgs, ... }:
268+ let projectOut = sys: (getReflexPlatform sys).project (args@{ nixpkgs, ... }:
271269 let mkProject = { android ? null #TODO: Better error when missing
272270 , ios ? null #TODO: Better error when missing
273271 , packages ? {}
@@ -300,7 +298,21 @@ in rec {
300298 privateConfigDirs = ["config/backend"];
301299 injectableConfig = builtins.filterSource (path: _:
302300 !(lib.lists.any (x: hasPrefix (toString base + "/" + toString x) (toString path)) privateConfigDirs)
303− ) configPath;
301+ );
302+ __android = configPath: {
303+ ${if android == null then null else frontendName} = {
304+ executableName = "frontend";
305+ ${if builtins.pathExists staticFiles then "assets" else null} =
306+ nixpkgs.obeliskExecutableConfig.platforms.android.inject (injectableConfig configPath) processedStatic.symlinked;
307+ } // android;
308+ };
309+ __ios = configPath: {
310+ ${if ios == null then null else frontendName} = {
311+ executableName = "frontend";
312+ ${if builtins.pathExists staticFiles then "staticSrc" else null} =
313+ nixpkgs.obeliskExecutableConfig.platforms.ios.inject (injectableConfig configPath) processedStatic.symlinked;
314+ } // ios;
315+ };
304316 in {
305317 inherit shellToolOverrides tools withHoogle;
306318 overrides = totalOverrides;
@@ -320,39 +332,25 @@ in rec {
320332 commonName
321333 ];
322334 };
323− android = {
324− ${if android == null then null else frontendName} = {
325− executableName = "frontend";
326− ${if builtins.pathExists staticFiles then "assets" else null} =
327− nixpkgs.obeliskExecutableConfig.platforms.android.inject injectableConfig processedStatic.symlinked;
328− } // android;
329− };
330− ios = {
331− ${if ios == null then null else frontendName} = {
332− executableName = "frontend";
333− ${if builtins.pathExists staticFiles then "staticSrc" else null} =
334− nixpkgs.obeliskExecutableConfig.platforms.ios.inject injectableConfig processedStatic.symlinked;
335− } // ios;
336− };
337− passthru = { inherit android ios packages overrides tools shellToolOverrides withHoogle staticFiles staticFilesImpure __closureCompilerOptimizationLevel; };
335+ android = __android null;
336+ ios = __ios null;
337+ passthru = { inherit android ios packages overrides tools shellToolOverrides withHoogle staticFiles staticFilesImpure __closureCompilerOptimizationLevel processedStatic __ios __android; };
338338 };
339339 in mkProject (projectDefinition args));
340− serverOn = sys: config: version: serverExe
340+ serverOn = sys: version: serverExe
341341 (projectOut sys).ghc.backend
342342 (projectOut system).ghcjs.frontend
343343 (projectOut sys).passthru.staticFiles
344− config
345344 (projectOut sys).passthru.__closureCompilerOptimizationLevel
346345 version;
347346 linuxExe = serverOn "x86_64-linux";
348347 dummyVersion = "Version number is only available for deployments";
349348 in projectOut system // {
350349 linuxExeConfigurable = linuxExe;
351− linuxExe = linuxExe (base + "/config") dummyVersion;
352− exe = serverOn system (base + "/config") dummyVersion;
353− server = args@{ hostName, adminEmail, routeHost, enableHttps, config, version }: let
354− injectableConfig = builtins.filterSource (path: _: !(lib.hasPrefix (toString config + "/backend") (toString path))) config;
355− in server (args // { exe = linuxExe injectableConfig version; });
350+ linuxExe = linuxExe dummyVersion;
351+ exe = serverOn system dummyVersion;
352+ server = args@{ hostName, adminEmail, routeHost, enableHttps, version }:
353+ server (args // { exe = linuxExe version; });
356354 obelisk = import (base + "/.obelisk/impl") {};
357355 };
358356 haskellPackageSets = {