-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
android-studio: fixing gui on tiling window managers #168391
android-studio: fixing gui on tiling window managers #168391
Conversation
6dd9cef
to
2b74699
Compare
2b74699
to
592dc9e
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.
LGTM, no test since I don't use sway or other tiling wm.
@@ -80,6 +81,7 @@ let | |||
--set-default JAVA_HOME "$out/jre" \ | |||
--set ANDROID_EMULATOR_USE_SYSTEM_LIBS 1 \ | |||
--set QT_XKB_CONFIG_ROOT "${xkeyboard_config}/share/X11/xkb" \ | |||
${if tiling_wm then "--set _JAVA_AWT_WM_NONREPARENTING 1" else ""} \ |
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.
My main concern is if this is the right way to do this. Seems a little messy
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 have not done this conditionals but another way would be to add it at the end as an optional
.
Examples from nixpkgs:
57- ''
58: + (lib.optionalString (lisp-compiler.pname == "ecl") ''
59- cp src/binary-ecl/maxima.fas* "$out/lib/maxima/${version}/binary-ecl/"
60- '')
64: ) ++ lib.optional enableCuda "-DGMX_GPU=CUDA";
39- "--with-gmp=${lib.getDev gmp}"
40- "--with-readline=${lib.getDev readline}"
41- ]
42: ++ lib.optional stdenv.isDarwin "--host=x86_64-darwin"
43: ++ lib.optional withThread "--mt=pthread";
Though, not really sure about best practices so can't help much more than pointing some of this examples.
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.
ah yeah, that is a little nicer.
2b74699
to
58b94a6
Compare
@@ -80,6 +81,7 @@ let | |||
--set-default JAVA_HOME "$out/jre" \ | |||
--set ANDROID_EMULATOR_USE_SYSTEM_LIBS 1 \ | |||
--set QT_XKB_CONFIG_ROOT "${xkeyboard_config}/share/X11/xkb" \ | |||
${lib.optionalString tiling_wm "--set _JAVA_AWT_WM_NONREPARENTING 1"} \ |
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.
LGTM
@ofborg eval |
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.
4 packages built:
android-studio androidStudioPackages.beta androidStudioPackages.canary androidStudioPackages.dev
LGTM, evals and builds though ofborg had an issue. Could someone rerun the ofborg eval?
When i first opened the PR, github was having some issues i think which is where the borg error came from. Once i rebased, the checks ran normally |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
Description of changes
On tiling window managers like sway, we need to set
_JAVA_AWT_WM_NONREPARENTING=1
in the android-studio wrapper for the gui to launch correctly as described here: https://github.com/swaywm/sway/wiki#issues-with-java-applicationsThings done
Added an extra argument to the
android-studio
derivation that lets us set the environment variable in the android-studio wrapper. After change on swaywmprovides a working android studio.
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes