@@ -115,7 +115,7 @@ let
115 obelisk-cliapp = self.callCabal2nix "obelisk-cliapp" (cleanSource ./lib/cliapp) {};
115 obelisk-cliapp = self.callCabal2nix "obelisk-cliapp" (cleanSource ./lib/cliapp) {};
116 obelisk-command = (self.callCabal2nix "obelisk-command" (cleanSource ./lib/command) {}).override { Cabal = super.Cabal_2_0_0_2; };
116 obelisk-command = (self.callCabal2nix "obelisk-command" (cleanSource ./lib/command) {}).override { Cabal = super.Cabal_2_0_0_2; };
117 obelisk-executable-config = executableConfig.haskellPackage self;
117 obelisk-executable-config = executableConfig.haskellPackage self;
118− obelisk-executable-config-inject = executableConfig.platforms.web.inject self; # TODO handle platforms.{ios,android}
118+ obelisk-executable-config-inject = executableConfig.platforms.web.inject self;
119 obelisk-migration = self.callCabal2nix "obelisk-migration" (cleanSource ./lib/migration) {};
119 obelisk-migration = self.callCabal2nix "obelisk-migration" (cleanSource ./lib/migration) {};
120 obelisk-run = self.callCabal2nix "obelisk-run" (cleanSource ./lib/run) {};
120 obelisk-run = self.callCabal2nix "obelisk-run" (cleanSource ./lib/run) {};
121 obelisk-selftest = self.callCabal2nix "obelisk-selftest" (cleanSource ./lib/selftest) {};
121 obelisk-selftest = self.callCabal2nix "obelisk-selftest" (cleanSource ./lib/selftest) {};
@@ -279,6 +279,12 @@ rec {
279 ${backendName} = addBuildDepend super.${backendName} self.obelisk-run;
279 ${backendName} = addBuildDepend super.${backendName} self.obelisk-run;
281 totalOverrides = composeExtensions (composeExtensions defaultHaskellOverrides projectOverrides) overrides;
281 totalOverrides = composeExtensions (composeExtensions defaultHaskellOverrides projectOverrides) overrides;
282+ inherit (nixpkgs) lib;
283+ inherit (lib.strings) hasPrefix;
284+ privateConfigDirs = ["config/backend"];
285+ injectableConfig = builtins.filterSource (path: _:
286+ !(lib.lists.any (x: hasPrefix (toString base + "/" + toString x) (toString path)) privateConfigDirs)
283 inherit shellToolOverrides tools withHoogle;
289 inherit shellToolOverrides tools withHoogle;
284 overrides = totalOverrides;
290 overrides = totalOverrides;
@@ -297,13 +303,15 @@ rec {
297 android = {
303 android = {
298 ${if android == null then null else frontendName} = {
304 ${if android == null then null else frontendName} = {
299 executableName = "frontend";
305 executableName = "frontend";
300− ${if builtins.pathExists staticPath then "assets" else null} = processedStatic.symlinked;
306+ ${if builtins.pathExists staticPath then "assets" else null} =
307+ executableConfig.platforms.android.inject injectableConfig processedStatic.symlinked;
301 } // android;
308 } // android;
304 ${if ios == null then null else frontendName} = {
311 ${if ios == null then null else frontendName} = {
305 executableName = "frontend";
312 executableName = "frontend";
306− ${if builtins.pathExists staticPath then "staticSrc" else null} = processedStatic.symlinked;
313+ ${if builtins.pathExists staticPath then "staticSrc" else null} =
314+ executableConfig.platforms.ios.inject injectableConfig processedStatic.symlinked;
307 } // ios;
315 } // ios;