@@ -255,13 +255,12 @@ in rec {
255255 # An Obelisk project is a reflex-platform project with a predefined layout and role for each component
256256 project = base: projectDefinition:
257257 let configPath = base + "/config";
258− static = base + "/static";
259− processedStatic = processAssets { src = static; };
260258 projectOut = sys: (getReflexPlatform sys).project (args@{ nixpkgs, ... }:
261259 let mkProject = { android ? null #TODO: Better error when missing
262260 , ios ? null #TODO: Better error when missing
263261 , packages ? {}
264262 , overrides ? _: _: {}
263+ , staticFiles ? base + /static
265264 , tools ? _: []
266265 , shellToolOverrides ? _: _: {}
267266 , withHoogle ? false # Setting this to `true` makes shell reloading far slower
@@ -270,7 +269,7 @@ in rec {
270269 backendName = "backend";
271270 commonName = "common";
272271 staticName = "obelisk-generated-static";
273− staticPath = base + "/static";
272+ processedStatic = processAssets { src = staticFiles; };
274273 # The packages whose names and roles are defined by this package
275274 predefinedPackages = lib.filterAttrs (_: x: x != null) {
276275 ${frontendName} = nullIfAbsent (base + "/frontend");
@@ -279,7 +278,7 @@ in rec {
279278 };
280279 combinedPackages = predefinedPackages // packages;
281280 projectOverrides = self: super: {
282− ${staticName} = haskellLib.dontHaddock (self.callCabal2nix "static" processedStatic.haskellManifest {});
281+ ${staticName} = haskellLib.dontHaddock (self.callCabal2nix staticName processedStatic.haskellManifest {});
283282 ${backendName} = haskellLib.addBuildDepend super.${backendName} self.obelisk-run;
284283 };
285284 totalOverrides = lib.composeExtensions projectOverrides overrides;
@@ -310,20 +309,21 @@ in rec {
310309 android = {
311310 ${if android == null then null else frontendName} = {
312311 executableName = "frontend";
313− ${if builtins.pathExists staticPath then "assets" else null} =
312+ ${if builtins.pathExists staticFiles then "assets" else null} =
314313 nixpkgs.obeliskExecutableConfig.platforms.android.inject injectableConfig processedStatic.symlinked;
315314 } // android;
316315 };
317316 ios = {
318317 ${if ios == null then null else frontendName} = {
319318 executableName = "frontend";
320− ${if builtins.pathExists staticPath then "staticSrc" else null} =
319+ ${if builtins.pathExists staticFiles then "staticSrc" else null} =
321320 nixpkgs.obeliskExecutableConfig.platforms.ios.inject injectableConfig processedStatic.symlinked;
322321 } // ios;
323322 };
323+ passthru = { inherit android ios packages overrides tools shellToolOverrides withHoogle staticFiles; };
324324 };
325325 in mkProject (projectDefinition args));
326− serverOn = sys: config: serverExe (projectOut sys).ghc.backend (projectOut system).ghcjs.frontend static config;
326+ serverOn = sys: config: serverExe (projectOut sys).ghc.backend (projectOut system).ghcjs.frontend (projectOut sys).passthru.staticFiles config;
327327 linuxExe = serverOn "x86_64-linux";
328328 in projectOut system // {
329329 linuxExeConfigurable = linuxExe;