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

electron: fix wrapGAppsHook usage #84981

Merged
merged 2 commits into from Apr 13, 2020

Conversation

prusnak
Copy link
Member

@prusnak prusnak commented Apr 11, 2020

Motivation for this change

Fixes #84913 by:

  1. reverting the riot-desktop change
  2. fixing wrapGAppsHook in electron
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.

@prusnak prusnak marked this pull request as ready for review April 11, 2020 19:57
@prusnak
Copy link
Member Author

prusnak commented Apr 11, 2020

Please review and test, I have very little idea of whether the change is correct.

However, I tried that applying the first commit breaks riot-desktop (opening a native file dialog will crash) and applying the second commit fixes it again.

@worldofpeace is that what you mean by "It needs to be rewritten in whatever fashion that the makeWrapper call happens in postFixup." in #84913?

@das-g
Copy link
Member

das-g commented Apr 13, 2020

Result of nixpkgs-review pr 84981:

1 package marked as broken and skipped:
  • hyper-haskell
11 package built:
  • electron
  • electron_5
  • electron_6
  • electron_7
  • electron_8
  • nix-tour
  • rambox-pro
  • riot-desktop
  • stretchly
  • teleprompter
  • typora

@das-g
Copy link
Member

das-g commented Apr 13, 2020

👍 I've tried the file open dialog (through "upload file") in the resulting riot-desktop application and it works fine. (I assume file open dialog is a native dialog, isn't it?)

@worldofpeace
Copy link
Contributor

Here's the wrapper content

export LD_PRELOAD='/nix/store/wswi9pd2nc25lqd52mnd94w90l1yxxni-libXScrnSaver-1.2.3/lib/libXss.so.1'${LD_PRELOAD:+':'}$LD_PRELOAD
export GIO_EXTRA_MODULES='/nix/store/0byixyx6l833y9a7ah8ygbh4d4nfgcin-dconf-0.36.0-lib/lib/gio/modules'${GIO_EXTRA_MODULES:+':'}$GIO_EXTRA_MODULES
export GIO_EXTRA_MODULES='/nix/store/0byixyx6l833y9a7ah8ygbh4d4nfgcin-dconf-0.36.0-lib/lib/gio/modules'${GIO_EXTRA_MODULES:+':'}$GIO_EXTRA_MODULES
export GDK_PIXBUF_MODULE_FILE='/nix/store/a7dwk7qamr2j7220rsfvn8w386b8a3lc-librsvg-2.48.0/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache'
export XDG_DATA_DIRS='/nix/store/2chzii7gwmlcii9x73l0v3bl7lf2awvb-gtk+3-3.24.14/share/gsettings-schemas/gtk+3-3.24.14:/nix/store/2chzii7gwmlcii9x73l0v3bl7lf2awvb-gtk+3-3.24.>
exec -a "$0" "/nix/store/0in2y9m4nsbkfg3h0yp18cmam4k6xifk-electron-8.0.0/lib/electron/.electron-wrapped"  "$@"

it has correct entries so this is wrapped correctly 👍

@worldofpeace
Copy link
Contributor

Please review and test, I have very little idea of whether the change is correct.

However, I tried that applying the first commit breaks riot-desktop (opening a native file dialog will crash) and applying the second commit fixes it again.

@worldofpeace is that what you mean by "It needs to be rewritten in whatever fashion that the makeWrapper call happens in postFixup." in #84913?

Yep, you've done this correctly.

@worldofpeace worldofpeace merged commit d49d840 into NixOS:master Apr 13, 2020
@prusnak prusnak deleted the electron-wrapGAppsHook branch April 13, 2020 21:43
@worldofpeace
Copy link
Contributor

backported to 20.03 in 3ad8596 22b5a32.

Thanks again for fixing this, it helped me out very much 👍

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.

Correct electron package wrapGAppsHook usage
3 participants