Skip to content
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

anki-bin: init at 2.1.36 #106638

Merged
merged 3 commits into from Dec 25, 2020
Merged

anki-bin: init at 2.1.36 #106638

merged 3 commits into from Dec 25, 2020

Conversation

Atemu
Copy link
Member

@Atemu Atemu commented Dec 11, 2020

Motivation for this change

Workaround for #78449

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@Atemu Atemu changed the title anki-bin: init anki-bin: init at 2.1.36 Dec 11, 2020
@Atemu Atemu force-pushed the anki-bin branch 2 times, most recently from d7b4a06 to 7818fd6 Compare December 11, 2020 18:07
@Atemu
Copy link
Member Author

Atemu commented Dec 11, 2020

/marvin opt-in
/status needs_reviewer

@marvin-mk2 marvin-mk2 bot added the marvin label Dec 11, 2020
@marvin-mk2
Copy link

marvin-mk2 bot commented Dec 11, 2020

Hi! I'm an experimental bot. My goal is to guide this PR through its stages, hopefully ending with a merge. You can read up on the usage here.

@vikanezrimaya
Copy link
Member

@Atemu how do I test this? Just building and running from result/bin/anki doesn't seem to do much:

vika@primrose ~ $ result-anki-bin/bin/anki
  File "runanki.py", line 4, in <module>
  File "aqt/__init__.py", line 399, in run
  File "aqt/__init__.py", line 445, in _run
  File "aqt/profiles.py", line 92, in setupMeta
  File "aqt/profiles.py", line 456, in _loadMeta
resetting corrupt _global
Qt warning: Failed to load client buffer integration: "wayland-egl"
Qt warning: Available client buffer integrations: ()
Qt warning: No shell integration named "xdg-shell" found
Qt warning: No shell integration named "xdg-shell-v6" found
Qt warning: No shell integration named "wl-shell" found
Qt warning: No shell integration named "ivi-shell" found
Qt warning: Loading shell integration failed.
Qt warning: Attempted to load the following shells ("xdg-shell", "xdg-shell-v6", "wl-shell", "ivi-shell")

@Atemu
Copy link
Member Author

Atemu commented Dec 12, 2020

Are you on wayland? Any QT environment variables set?

I only tested this on Xorg and I don't think it'd work anywhere else.

@vikanezrimaya
Copy link
Member

Yes, I am on Wayland, as Xorg doesn't work on my laptop properly. What would be the quickest way to launch, say, a window with Openbox inside to test an Xorg-only app?

$ env | grep -ie wayland -e qt
QTWEBKIT_PLUGIN_PATH=/home/vika/.local/share/flatpak/exports/lib/mozilla/plugins/:/var/lib/flatpak/exports/lib/mozilla/plugins/:/home/vika/.nix-profile/lib/mozilla/plugins/:/etc/profiles/per-user/vika/lib/mozilla/plugins/:/nix/var/nix/profiles/default/lib/mozilla/plugins/:/run/current-system/sw/lib/mozilla/plugins/
WAYLAND_DISPLAY=wayland-0
QT_QPA_PLATFORMTHEME=gtk2
BEMENU_BACKEND=wayland
SDL_VIDEODRIVER=wayland
XDG_SESSION_TYPE=wayland
QT_PLUGIN_PATH=/home/vika/.local/share/flatpak/exports/lib/qt4/plugins:/home/vika/.local/share/flatpak/exports/lib/kde4/plugins:/var/lib/flatpak/exports/lib/qt4/plugins:/var/lib/flatpak/exports/lib/kde4/plugins:/home/vika/.nix-profile/lib/qt4/plugins:/home/vika/.nix-profile/lib/kde4/plugins:/etc/profiles/per-user/vika/lib/qt4/plugins:/etc/profiles/per-user/vika/lib/kde4/plugins:/nix/var/nix/profiles/default/lib/qt4/plugins:/nix/var/nix/profiles/default/lib/kde4/plugins:/run/current-system/sw/lib/qt4/plugins:/run/current-system/sw/lib/kde4/plugins
QT_WAYLAND_DISABLE_WINDOWDECORATION=1
QT_QPA_PLATFORM=wayland
MOZ_ENABLE_WAYLAND=1

@Atemu
Copy link
Member Author

Atemu commented Dec 12, 2020

It might be worth trying to run it in XWayland. env -i ./result/bin/anki should clear any env variable signaling QT to use Wayland natively and it'd fall back to X11.

Otherwise, nixos-rebuild build-vming your config with but with Xorg would probably be pretty simple and easy.

pkgs/games/anki/bin.nix Outdated Show resolved Hide resolved
@vikanezrimaya
Copy link
Member

vikanezrimaya commented Dec 12, 2020

I cleared my environment and after adding LANG and DISPLAY I can confirm the application launches. With the exception of a nitpick mentioned in my review above, this looks ready to merge.

@vikanezrimaya

This comment has been minimized.

@vikanezrimaya
Copy link
Member

Oh, wait, I accidentally broke the bot. /status awaiting_changes

@vikanezrimaya
Copy link
Member

/status needs_merger

pkgs/games/anki/bin.nix Outdated Show resolved Hide resolved
pkgs/games/anki/bin.nix Outdated Show resolved Hide resolved
pkgs/games/anki/bin.nix Outdated Show resolved Hide resolved
@timokau
Copy link
Member

timokau commented Dec 21, 2020

If it works in XWayland and there's an easy way to force that via a wrapper, I could at least do that.

Since this already tripped up two people, I think we should add the wrapper. Clearing the environment seemed to work, do you know which variables were at fault? If not, @kisik21 could you try to find out?

@Profpatsch I tend to agree with @Atemu that we don't need to explicitly migrate people. They can opt-in to anki-bin, and then they will notice once the package is no longer available. Having to replace anki-bin with anki again seems reasonable to me. At least that way they'll be aware of it too. What do you think?

@vikanezrimaya
Copy link
Member

vikanezrimaya commented Dec 21, 2020 via email

@Atemu
Copy link
Member Author

Atemu commented Dec 22, 2020

I'll get on that when I get my AMDGPU on Wednesday and can actually use Wayland properly. Can't wait to finally be free of this blobby Nvidia crap.

@timokau
Copy link
Member

timokau commented Dec 22, 2020

Thanks for digging into this @kisik21 :) No hurry, I'll just change the status so that marvin won't nag us.

/status awaiting_changes

Atemu and others added 3 commits December 24, 2020 07:02
Works around NixOS#78449

Co-authored-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Co-authored-by: Vika <vika@fireburn.ru>
Copy link
Member

@veprbl veprbl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works on macOS

Copy link
Member

@timokau timokau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

pkgs/games/anki/bin.nix Show resolved Hide resolved
@timokau timokau merged commit 675660e into NixOS:master Dec 25, 2020
@Atemu Atemu deleted the anki-bin branch December 25, 2020 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants