Skip to content

chrome-gnome-shell: refactor#28882

Merged
jtojnar merged 3 commits intoNixOS:masterfrom
jtojnar:chrome-gnome-shell
Jan 19, 2018
Merged

chrome-gnome-shell: refactor#28882
jtojnar merged 3 commits intoNixOS:masterfrom
jtojnar:chrome-gnome-shell

Conversation

@jtojnar
Copy link
Member

@jtojnar jtojnar commented Sep 2, 2017

The native connector requires a D-Bus service. For firefox it is also necessary to enable the host connector, for example by setting nixpkgs.config.firefox.enableGnomeExtensions to true.

Unfortunately, it still does not work because the browsers require manifest files, Chromium in /etc/chromium/native-messaging-hosts and Firefox in /usr/lib64/mozilla/native-messaging-hosts.

One way to make it work is to copy the files to local folder:

# Firefox
mkdir ~/.mozilla/native-messaging-hosts
cp $(dirname $(readlink -f $(which chrome-gnome-shell)))/../lib/mozilla/native-messaging-hosts/org.gnome.chrome_gnome_shell.json ~/.mozilla/native-messaging-hosts
# Chromium
mkdir ~/.config/chromium/NativeMessagingHosts
cp $(dirname $(readlink -f $(which chrome-gnome-shell)))/../etc/chromium/native-messaging-hosts/org.gnome.chrome_gnome_shell.json ~/.config/chromium/NativeMessagingHosts
Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

cc @dyrnade

@mention-bot
Copy link

@jtojnar, thanks for your PR! By analyzing the history of the files in this pull request, we identified @dyrnade, @lheckemann and @edolstra to be potential reviewers.

@jtojnar jtojnar changed the title Chrome gnome shell chrome-gnome-shell: refactor Sep 2, 2017
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is the wrapper no longer needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Switched to wrapGAppsHook. I still wrap PYTHONPATH through wrapPrefixVariables. PATH does not seem to be needed.

@roastiek
Copy link
Contributor

roastiek commented Nov 6, 2017

I think you could get it working in chromium/chrome out of the box by adding this lines into module:

  environment.etc."chromium/native-messaging-hosts/org.gnome.chrome_gnome_shell.json".source = "${pkgs.chrome-gnome-shell}/etc/chromium/native-messaging-hosts/org.gnome.chrome_gnome_shell.json";
  environment.etc."opt/chrome/native-messaging-hosts/org.gnome.chrome_gnome_shell.json".source = "${pkgs.chrome-gnome-shell}/etc/opt/chrome/native-messaging-hosts/org.gnome.chrome_gnome_shell.json";

@joachifm
Copy link
Contributor

@GrahamcOfBorg eval

@jtojnar jtojnar force-pushed the chrome-gnome-shell branch 2 times, most recently from 78725ad to c208d59 Compare January 13, 2018 14:09
@GrahamcOfBorg GrahamcOfBorg added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Jan 13, 2018
@jtojnar jtojnar force-pushed the chrome-gnome-shell branch from c208d59 to fe11f46 Compare January 13, 2018 14:20
@jtojnar jtojnar force-pushed the chrome-gnome-shell branch from fe11f46 to 062cafa Compare January 13, 2018 14:23
@jtojnar
Copy link
Member Author

jtojnar commented Jan 13, 2018

@deedrah I merged your firefox patch.

@jtojnar jtojnar added 6.topic: GNOME GNOME desktop environment and its underlying platform 8.has: clean-up This PR removes packages or removes other cruft labels Jan 13, 2018
@jtojnar jtojnar merged commit d2d1a2d into NixOS:master Jan 19, 2018
@jtojnar jtojnar deleted the chrome-gnome-shell branch January 19, 2018 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: GNOME GNOME desktop environment and its underlying platform 8.has: clean-up This PR removes packages or removes other cruft 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants