From 24688a93eb2f705ff9239d04e31b0b5209255169 Mon Sep 17 00:00:00 2001 From: Luigy Leon Date: Fri, 21 Sep 2018 13:04:00 -0400 Subject: [PATCH] Renames to match routes branch (cherry picked from commit e279e99296227407d78312bd0f0240692e5fc9c3) --- default.nix | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/default.nix b/default.nix index ebfa2eb8b..150945db7 100644 --- a/default.nix +++ b/default.nix @@ -5,8 +5,8 @@ let getReflexPlatform = sys: import ./dep/reflex-platform { inherit iosSdkVersion; system = sys; }; reflex-platform = getReflexPlatform system; - inherit (reflex-platform) hackGet; - pkgs = reflex-platform.nixpkgs; + inherit (reflex-platform) hackGet nixpkgs; + pkgs = nixpkgs; in with pkgs.haskell.lib; with pkgs.lib; let # TODO: Remove this after updating nixpkgs: https://github.com/NixOS/nixpkgs/issues/37750 @@ -249,8 +249,9 @@ rec { # An Obelisk project is a reflex-platform project with a predefined layout and role for each component project = base: projectDefinition: - let assets = processAssets { src = base + "/static"; }; - configPath = base + "/config"; + let configPath = base + "/config"; + static = base + "/static"; + processedStatic = processAssets { src = static; }; projectOut = sys: (getReflexPlatform sys).project (args@{ nixpkgs, ... }: let mkProject = { android ? null #TODO: Better error when missing , ios ? null #TODO: Better error when missing @@ -274,7 +275,7 @@ rec { }; combinedPackages = predefinedPackages // packages; projectOverrides = self: super: { - ${staticName} = dontHaddock (self.callCabal2nix "static" assets.haskellManifest {}); + ${staticName} = dontHaddock (self.callCabal2nix "static" processedStatic.haskellManifest {}); ${backendName} = addBuildDepend super.${backendName} self.obelisk-run; }; totalOverrides = composeExtensions (composeExtensions defaultHaskellOverrides projectOverrides) overrides; @@ -296,19 +297,18 @@ rec { android = { ${if android == null then null else frontendName} = { executableName = "frontend"; - ${if builtins.pathExists staticPath then "assets" else null} = assets.symlinked; + ${if builtins.pathExists staticPath then "assets" else null} = processedStatic.symlinked; } // android; }; ios = { ${if ios == null then null else frontendName} = { executableName = "frontend"; - ${if builtins.pathExists staticPath then "staticSrc" else null} = assets.symlinked; + ${if builtins.pathExists staticPath then "staticSrc" else null} = processedStatic.symlinked; } // ios; }; }; in mkProject (projectDefinition args)); - serverOn = sys: - serverExe (projectOut sys).ghc.backend (projectOut system).ghcjs.frontend assets.symlinked configPath; + serverOn = sys: serverExe (projectOut sys).ghc.backend (projectOut system).ghcjs.frontend static configPath; linuxExe = serverOn "x86_64-linux"; in projectOut system // { inherit linuxExe;