-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix mobile builds #1108
base: haskell.nix
Are you sure you want to change the base?
Fix mobile builds #1108
Changes from 1 commit
3e7d3fe
850749c
5381781
2ba24b0
f44cf14
e3abc6e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,23 +15,72 @@ | |
} | ||
}: | ||
with obelisk; | ||
project {} ({ pkgs, ... }: { | ||
let args = { | ||
# You must accept the Android Software Development Kit License Agreement at | ||
# https://developer.android.com/studio/terms in order to build Android apps. | ||
# Uncomment this to indicate your acceptance: | ||
android_sdk_accept_license = true; | ||
allowUnfree = true; | ||
}; in | ||
|
||
project args ({ pkgs, ... }: { | ||
name = "skeleton"; | ||
android = { | ||
executable = ps: exes: (exes (ps.frontend)).frontend; | ||
executableName = "obelisk-skeleton"; | ||
applicationId = "systems.obsidian.obelisk.examples.minimal"; | ||
displayName = "Obelisk Minimal Example"; | ||
}; | ||
ios = { | ||
executable = ps: exes: (exes (ps.frontend)).frontend; | ||
executableName = "obelisk-skeleton"; | ||
bundleIdentifier = "systems.obsidian.obelisk.examples.minimal"; | ||
bundleName = "Obelisk Minimal Example"; | ||
}; | ||
web = { | ||
executable = ps: exes: (exes (ps.frontend)).frontend; | ||
}; | ||
extraArgs = { | ||
staticFiles = ./static; | ||
}; | ||
src = ./.; | ||
inputThunks = pkgs.obsidianCompilers.thunkSets.common ++ [ | ||
pkgs._dep.source.aeson-1541 | ||
pkgs._dep.source.android-activity | ||
cidkidnix marked this conversation as resolved.
Show resolved
Hide resolved
|
||
]; | ||
shells = ps: with ps; [ | ||
backend | ||
]; | ||
overrides = [ | ||
({ config, pkgs, lib, ... }: { | ||
config.enableShared = if pkgs.stdenv.targetPlatform.isiOS then lib.mkForce false else true; | ||
config.enableStatic = lib.mkForce true; | ||
}) | ||
({pkgs, lib, config, ... }: { | ||
packages.obelisk-run.components.library.build-tools = with pkgs; [ | ||
iproute | ||
]; | ||
packages.obelisk-run.components.library.build-tools = with pkgs; [ | ||
iproute | ||
]; | ||
|
||
packages.reflex-dom = { | ||
flags = { | ||
webkit2gtk = if (pkgs.stdenv.targetPlatform.isAndroid) then lib.mkForce false else true; | ||
}; | ||
}; | ||
|
||
packages.frontend.components.exes.frontend = { | ||
frameworks = if (!pkgs.stdenv.targetPlatform.isiOS && pkgs.stdenv.targetPlatform.isDarwin) then [ pkgs.darwin.apple_sdk.frameworks.CoreFoundation ] else [ ]; | ||
postInstall = lib.optionalString (pkgs.stdenv.hostPlatform.isDarwin) '' | ||
mkdir -p $out/obelisk-skeleton.app | ||
cp -r obelisk-skeleton $out | ||
cp $out/bin/obelisk-skeleton $out/obelisk-skeleton.app | ||
''; | ||
}; | ||
packages.jsaddle-wkwebview.src = (thunkSource ../dep/jsaddle) + "/jsaddle-wkwebview"; | ||
packages.jsaddle-wkwebview.components.library = { | ||
frameworks = | ||
if (pkgs.stdenv.targetPlatform.isiOS) then lib.mkForce [ pkgs.darwin.iosSdkPkgs.sdk pkgs.darwin.apple_sdk.frameworks.CoreFoundation ] | ||
else [ pkgs.darwin.apple_sdk.frameworks.CoreFoundation ]; | ||
}; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was getting webkit2gtk eval failures on android so cargo-culted this section from https://github.com/reflex-frp/reflex-platform/blob/4fccfb196ac724695a5006a456b2125eeff331e5/example/default.nix#L62 We definitely don't want this re-done on every project. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the linked code should always be applied in obelisk (not so much in reflex-platform). If folks need to overwrite it they can use "lib.mkOverride" for a higher value than "lib.mkForce". I'd much rather this be a default instead of some documentation or comments anywhere There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well yes but a default on obelisk or on the obelisk skeleton? |
||
}) | ||
]; | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be set to false before merging.
How do we make sure CI caches it though?
Add the accept/allow as args to this file defaulting to false and overriden by CI?