@@ -1,4 +1,7 @@
1−{ self-args ? {}
1+{ self-args ? {
2+ config.android_sdk.accept_license = true;
3+ iosSdkVersion = "10.2";
4+ }
25, local-self ? import ./. self-args
36}:
47
@@ -45,7 +48,7 @@ let
4548 in pkgAttrs: builtins.concatLists (map extractDeps (builtins.attrValues pkgAttrs));
4649
4750 perPlatform = lib.genAttrs cacheBuildSystems (system: let
48− obelisk = import ./. { inherit system; };
51+ obelisk = import ./. (self-args // { inherit system; });
4952 reflex-platform = obelisk.reflex-platform;
5053 ghc = pnameToAttrs
5154 obelisk.haskellPackageSets.ghc
@@ -58,30 +61,36 @@ let
5861 (builtins.attrValues ghcjs)
5962 (concatDepends ghc)
6063 (concatDepends ghcjs)
61− [command serverExeSkeleton iosSkeleton androidSkeleton]
64+ (lib.optional reflex-platform.androidSupport androidSkeleton)
65+ (lib.optional reflex-platform.iosSupport iosSkeleton)
66+ [ command serverSkeletonExe serverSkeletonShell ]
6267 ];
63− command = local-self.command;
64− serverExeSkeleton = (import ./skeleton { obelisk = local-self; }).exe;
65− androidObelisk = import ./. (self-args // {
66− config.android_sdk.accept_license = true;
67− });
68− androidSkeleton = (import ./skeleton { obelisk = androidObelisk; }).android.frontend;
69− iosObelisk = import ./. (self-args // {
70− system = "x86_64-darwin";
71− iosSdkVersion = "10.2";
72− });
73− iosSkeleton = (import ./skeleton { obelisk = iosObelisk; }).ios.frontend;
68+ command = obelisk.command;
69+ skeleton = import ./skeleton { inherit obelisk; };
70+ serverSkeletonExe = skeleton.exe;
71+ # TODO fix nixpkgs so it doesn't try to run the result of haskell shells as setup hooks.
72+ serverSkeletonShell = local-self.nixpkgs.runCommand "shell-safe-for-dep" {} ''
73+ touch "$out"
74+ echo "return" >> "$out"
75+ cat "${skeleton.shells.ghc}" >> "$out"
76+ '';
77+ androidSkeleton = (import ./skeleton { inherit obelisk; }).android.frontend;
78+ iosSkeleton = (import ./skeleton { inherit obelisk; }).ios.frontend;
7479 in {
7580 inherit
7681 command
7782 ghc ghcjs
78− serverExeSkeleton
79− iosSkeleton
80− androidSkeleton;
83+ serverSkeletonExe
84+ serverSkeletonShell
85+ ;
8186 cache = reflex-platform.pinBuildInputs "obelisk-${system}" cachePackages;
87+ } // lib.optionalAttrs reflex-platform.androidSupport {
88+ inherit androidSkeleton;
89+ } // lib.optionalAttrs reflex-platform.iosSupport {
90+ inherit iosSkeleton;
8291 });
8392
84− metaCache = local-self.pinBuildInputs
93+ metaCache = local-self.reflex-platform.pinBuildInputs
8594 "obelisk-everywhere"
8695 (map (a: a.cache) (builtins.attrValues perPlatform));
8796