Skip to content

Commit

Permalink
Renames to match routes branch
Browse files Browse the repository at this point in the history
(cherry picked from commit e279e99)
  • Loading branch information
luigy committed Sep 21, 2018
1 parent 7c7ebed commit 24688a9
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 24688a9

Please sign in to comment.