on master help sign in
Expose profiled in obelisk

This adds profiled attr to set enableLibraryProfiling to true. If not set, it defaults to profiling arg.

commit383781d72697108e8b7018d302cda4370d81a327 authorMatthew Bauer <mjbauer95@gmail.com> dateMon 10 Feb 2020, 16:26 (7 years ago) parenteea6d5b
1 file changed+6−7
default.nix+6−7
default.nix+6−7
@@ -17,10 +17,8 @@ let
1717 openssh
1818 ];
1919
20− getReflexPlatform = sys: reflex-platform-func {
21− inherit iosSdkVersion config;
22− system = sys;
23− enableLibraryProfiling = profiling;
20+ getReflexPlatform = { system, enableLibraryProfiling ? profiling }: reflex-platform-func {
21+ inherit iosSdkVersion config system enableLibraryProfiling;
2422
2523 nixpkgsOverlays = [
2624 (self: super: {
@@ -102,7 +100,7 @@ let
102100 ];
103101 };
104102
105− reflex-platform = getReflexPlatform system;
103+ reflex-platform = getReflexPlatform { inherit system; };
106104 inherit (reflex-platform) hackGet nixpkgs;
107105 pkgs = nixpkgs;
108106
@@ -261,7 +259,7 @@ in rec {
261259 # An Obelisk project is a reflex-platform project with a predefined layout and role for each component
262260 project = base': projectDefinition:
263261 let
264− projectOut = sys: let reflexPlatformProject = (getReflexPlatform sys).project; in reflexPlatformProject (args@{ nixpkgs, ... }:
262+ projectOut = { system, enableLibraryProfiling ? profiling }: let reflexPlatformProject = (getReflexPlatform { inherit system enableLibraryProfiling; }).project; in reflexPlatformProject (args@{ nixpkgs, ... }:
265263 let
266264 inherit (lib.strings) hasPrefix;
267265 mkProject =
@@ -366,7 +364,7 @@ in rec {
366364 });
367365 in allConfig;
368366 in (mkProject (projectDefinition args)).projectConfig);
369− mainProjectOut = projectOut system;
367+ mainProjectOut = projectOut { inherit system; };
370368 serverOn = projectInst: version: serverExe
371369 projectInst.ghc.backend
372370 mainProjectOut.ghcjs.frontend
@@ -376,6 +374,7 @@ in rec {
376374 linuxExe = serverOn (projectOut "x86_64-linux");
377375 dummyVersion = "Version number is only available for deployments";
378376 in mainProjectOut // {
377+ profiled = projectOut { inherit system; enableLibraryProfiling = true; };
379378 linuxExeConfigurable = linuxExe;
380379 linuxExe = linuxExe dummyVersion;
381380 exe = serverOn mainProjectOut dummyVersion;