-
Notifications
You must be signed in to change notification settings - Fork 107
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
Conversation
# A simple derivation that just creates a file with the names of all | ||
# of its inputs. If built, it will have a runtime dependency on all | ||
# of the given build inputs. | ||
pinBuildInputs = name: buildInputs: (local-self.nixpkgs.releaseTools.aggregate { |
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.
This was removed from reflex-platform. Not sure if intentional
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.
Yeah, I wasn't needing them while doing the haskell.nix work. I don't think we need them in reflex-platform anymore but pulling it into the obelisk nix is fine by me
@@ -55,7 +54,7 @@ let | |||
}); | |||
|
|||
perPlatform = lib.genAttrs cacheBuildSystems (system: let | |||
reflex-platform = import ./dep/mars { inherit system __useNewerCompiler; }; |
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.
Gives me eval errors
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.
If you could post those errors that'd be great!
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.
I mean, the flag is gone on the haskell.nix branch.
Compare
https://github.com/reflex-frp/reflex-platform/blob/2e0d31bc1b565eed02a3848cde0e0dbc4f33a2d4/default.nix#L12
with
https://github.com/reflex-frp/reflex-platform/blob/4fccfb196ac724695a5006a456b2125eeff331e5/default.nix#L2
inherit iosSkeleton; | ||
} // lib.optionalAttrs (system == "x86_64-linux") { | ||
android-app = rawSkeleton.android.app.aarch64; | ||
} // lib.optionalAttrs (system == "x86_64-darwin") { |
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.
androidSupport/iosSupport
are gone:
https://github.com/reflex-frp/reflex-platform/blob/20a0a01ec32a747106cb22605832cb57f6fb62ca/default.nix#L106-L107
For now I mirrored what's in
https://github.com/reflex-frp/reflex-platform/blob/20a0a01ec32a747106cb22605832cb57f6fb62ca/release.nix#L15-L20
but it's strange that the logic for whether a platform is supported be pushed on users
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.
hm the ghcShell
failure on darwin is interesting, I think we'll be okay disabling it (for now at least) but maybe we should be disabling webkit2gtk for darwin..
5b3ff5d
to
8e2b84c
Compare
5e4f911
to
cc748ca
Compare
cc748ca
to
86d56e8
Compare
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 comment
The 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.
Something more like, shoved into a trivially importable overlay on reflex-platform?
Could maybe have it implicitly applied by obelisk, but then what happens on module conflicts?
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.
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 comment
The reason will be displayed to describe this comment to others. Learn more.
Well yes but a default on obelisk or on the obelisk skeleton?
86d56e8
to
f44cf14
Compare
# 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; |
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?
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 comment
The reason will be displayed to describe this comment to others. Learn more.
Well yes but a default on obelisk or on the obelisk skeleton?
@@ -55,7 +54,7 @@ let | |||
}); | |||
|
|||
perPlatform = lib.genAttrs cacheBuildSystems (system: let | |||
reflex-platform = import ./dep/mars { inherit system __useNewerCompiler; }; |
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.
I mean, the flag is gone on the haskell.nix branch.
Compare
https://github.com/reflex-frp/reflex-platform/blob/2e0d31bc1b565eed02a3848cde0e0dbc4f33a2d4/default.nix#L12
with
https://github.com/reflex-frp/reflex-platform/blob/4fccfb196ac724695a5006a456b2125eeff331e5/default.nix#L2
I have:
develop
branchhlint .
(lint found code you did not write can be left alone)$(nix-build -A selftest --no-out-link)
nix-build release.nix -A build.x86_64-linux --no-out-link
(orx86_64-darwin
on macOS)