-
-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
android-studio-full: init #315233
android-studio-full: init #315233
Conversation
18800cb
to
a3a6cdf
Compare
9f42b76
to
292b9ac
Compare
It looks awesome. Thanks |
292b9ac
to
76c94ce
Compare
76c94ce
to
d212a65
Compare
d212a65
to
bde96f0
Compare
bde96f0
to
c9ecc20
Compare
Agree, this looks great. Looking forward to getting it merged |
dd91a55
to
d15bfef
Compare
Rename androidPkgs_9_0 to androidPkgs, and treat it more like a "full" androidenv package.
This package provides Android Studio with a relatively complete set of SDK and emulator packages.
d15bfef
to
c1adf2f
Compare
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.
Good stuff.
A user on the Discord had a problem running the emulator from Android Studio, and it required the unnecessarily complicated solution of instantiating androidenv separately and writing out the local.properties with sdk.dir set. It was so close that I realized we could just wrap it and get the best of both worlds. It's 100% worth observing how newbies to Nix use our stuff. After a couple hours of going back and forth, the use case was glaringly obvious. |
Only thing I'm not sure about is the changelog, which may require a manual merge. |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-already-reviewed/2617/1727 |
Successfully created backport PR for |
Changelog fixed in #320194 |
Description of changes
Create the following APIs that bridge the gap between Android Studio and androidenv:
androidStudioPackages.<flavor>.withSdk
: Wraps Android Studio in an Android SDK created with androidenv. Exports ANDROID_SDK_ROOT and ANDROID_NDK_ROOT to the environment of the Android Studio process, if detected. This makes new projects default to the androidenv composition instead of needing to download SDKs separately, which causes emulators to break with dynamic linker errors when users try to run Android Studio out of the box on nixpkgs. Since androidenv already solves this problem, this improves the out of the box experience with Android Studio in nixpkgs.androidStudioPackages.<flavor>.full
: Wraps Android Studio in a default "full" SDK compositionandroid-studio-full
: Alias for android-studio.fullRemove the following old androidenv composition:
androidenv.androidPkgs_9_0
Add the following new androidenv composition:
androidenv.androidPkgs
We should probably discuss this API change since it downloads a ton of Android system images, but is a way to have a relatively "full" version of androidPkgs.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 馃憤 reaction to pull requests you find important.