gnome-browser-connector: 10.1 → 42.0

https://discourse.gnome.org/t/split-and-rename-of-chrome-gnome-shell/11075
815ec9e1af...v42.0

- Renamed and split into a separate repo from the extensions.
- CMake build replaced with Meson (jq also not needed)
- requests Python module not needed since updates are now solely handled by GNOME Shell itself

Also

- Corrected license
- Cleaned up the module
- Replaced PYTHONPATH in a wrapper by Python environment

Changelog-Reviewed-By: Jan Tojnar <jtojnar@gmail.com>
This commit is contained in:
Jan Tojnar 2022-07-27 00:23:44 +02:00
parent 4bb0379b81
commit 50c6895e77
9 changed files with 120 additions and 117 deletions

View file

@ -391,9 +391,9 @@
./services/desktops/pipewire/pipewire-media-session.nix
./services/desktops/pipewire/wireplumber.nix
./services/desktops/gnome/at-spi2-core.nix
./services/desktops/gnome/chrome-gnome-shell.nix
./services/desktops/gnome/evolution-data-server.nix
./services/desktops/gnome/glib-networking.nix
./services/desktops/gnome/gnome-browser-connector.nix
./services/desktops/gnome/gnome-initial-setup.nix
./services/desktops/gnome/gnome-keyring.nix
./services/desktops/gnome/gnome-online-accounts.nix

View file

@ -1,41 +0,0 @@
# Chrome GNOME Shell native host connector.
{ config, lib, pkgs, ... }:
with lib;
{
meta = {
maintainers = teams.gnome.members;
};
# Added 2021-05-07
imports = [
(mkRenamedOptionModule
[ "services" "gnome3" "chrome-gnome-shell" "enable" ]
[ "services" "gnome" "chrome-gnome-shell" "enable" ]
)
];
###### interface
options = {
services.gnome.chrome-gnome-shell.enable = mkEnableOption (lib.mdDoc ''
Chrome GNOME Shell native host connector, a DBus service
allowing to install GNOME Shell extensions from a web browser.
'');
};
###### implementation
config = mkIf config.services.gnome.chrome-gnome-shell.enable {
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";
"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";
};
environment.systemPackages = [ pkgs.chrome-gnome-shell ];
services.dbus.packages = [ pkgs.chrome-gnome-shell ];
nixpkgs.config.firefox.enableGnomeExtensions = true;
};
}

View file

@ -0,0 +1,47 @@
{ config, lib, pkgs, ... }:
let
inherit (lib) mdDoc mkEnableOption mkIf mkRenamedOptionModule teams;
in
{
meta = {
maintainers = teams.gnome.members;
};
imports = [
# Added 2021-05-07
(mkRenamedOptionModule
[ "services" "gnome3" "chrome-gnome-shell" "enable" ]
[ "services" "gnome" "gnome-browser-connector" "enable" ]
)
# Added 2022-07-25
(mkRenamedOptionModule
[ "services" "gnome" "chrome-gnome-shell" "enable" ]
[ "services" "gnome" "gnome-browser-connector" "enable" ]
)
];
options = {
services.gnome.gnome-browser-connector.enable = mkEnableOption (mdDoc ''
Native host connector for the GNOME Shell browser extension, a DBus service
allowing to install GNOME Shell extensions from a web browser.
'');
};
config = mkIf config.services.gnome.gnome-browser-connector.enable {
environment.etc = {
"chromium/native-messaging-hosts/org.gnome.browser_connector.json".source = "${pkgs.gnome-browser-connector}/etc/chromium/native-messaging-hosts/org.gnome.browser_connector.json";
"opt/chrome/native-messaging-hosts/org.gnome.browser_connector.json".source = "${pkgs.gnome-browser-connector}/etc/opt/chrome/native-messaging-hosts/org.gnome.browser_connector.json";
# Legacy paths.
"chromium/native-messaging-hosts/org.gnome.chrome_gnome_shell.json".source = "${pkgs.gnome-browser-connector}/etc/chromium/native-messaging-hosts/org.gnome.chrome_gnome_shell.json";
"opt/chrome/native-messaging-hosts/org.gnome.chrome_gnome_shell.json".source = "${pkgs.gnome-browser-connector}/etc/opt/chrome/native-messaging-hosts/org.gnome.chrome_gnome_shell.json";
};
environment.systemPackages = [ pkgs.gnome-browser-connector ];
services.dbus.packages = [ pkgs.gnome-browser-connector ];
nixpkgs.config.firefox.enableGnomeExtensions = true;
};
}

View file

@ -389,8 +389,8 @@ in
++ utils.removePackagesByName optionalPackages config.environment.gnome.excludePackages;
services.colord.enable = mkDefault true;
services.gnome.chrome-gnome-shell.enable = mkDefault true;
services.gnome.glib-networking.enable = true;
services.gnome.gnome-browser-connector.enable = mkDefault true;
services.gnome.gnome-initial-setup.enable = mkDefault true;
services.gnome.gnome-remote-desktop.enable = mkDefault true;
services.gnome.gnome-settings-daemon.enable = true;

View file

@ -4,7 +4,7 @@
## various stuff that can be plugged in
, ffmpeg_5, xorg, alsa-lib, libpulseaudio, libcanberra-gtk3, libglvnd, libnotify, opensc
, gnome/*.gnome-shell*/
, browserpass, chrome-gnome-shell, uget-integrator, plasma5Packages, bukubrow, pipewire
, browserpass, gnome-browser-connector, uget-integrator, plasma5Packages, bukubrow, pipewire
, tridactyl-native
, fx_cast_bridge
, udev
@ -65,7 +65,7 @@ let
++ lib.optional (cfg.enableBrowserpass or false) (lib.getBin browserpass)
++ lib.optional (cfg.enableBukubrow or false) bukubrow
++ lib.optional (cfg.enableTridactylNative or false) tridactyl-native
++ lib.optional (cfg.enableGnomeExtensions or false) chrome-gnome-shell
++ lib.optional (cfg.enableGnomeExtensions or false) gnome-browser-connector
++ lib.optional (cfg.enableUgetIntegrator or false) uget-integrator
++ lib.optional (cfg.enablePlasmaBrowserIntegration or false) plasma5Packages.plasma-browser-integration
++ lib.optional (cfg.enableFXCastBridge or false) fx_cast_bridge

View file

@ -1,71 +0,0 @@
{ lib, stdenv
, fetchurl
, cmake
, ninja
, jq
, python3
, gnome
, wrapGAppsHook
, gobject-introspection
}:
let
inherit (python3.pkgs) python pygobject3 requests;
in
stdenv.mkDerivation rec {
pname = "chrome-gnome-shell";
version = "10.1";
src = fetchurl {
url = "mirror://gnome/sources/chrome-gnome-shell/${version}/${pname}-${version}.tar.xz";
sha256 = "0f54xyamm383ypbh0ndkza0pif6ljddg2f947p265fkqj3p4zban";
};
nativeBuildInputs = [
cmake
ninja
jq
wrapGAppsHook
gobject-introspection # for setup-hook
];
buildInputs = [
gnome.gnome-shell
python
pygobject3
requests
gobject-introspection # for Gio typelib
];
cmakeFlags = [
"-DBUILD_EXTENSION=OFF"
];
wrapPrefixVariables = [
"PYTHONPATH"
];
# cmake setup hook changes /etc/opt into /var/empty
dontFixCmake = true;
preConfigure = ''
substituteInPlace CMakeLists.txt --replace "/etc" "$out/etc"
'';
passthru = {
updateScript = gnome.updateScript {
packageName = "chrome-gnome-shell";
};
};
meta = with lib; {
description = "GNOME Shell integration for Chrome";
homepage = "https://wiki.gnome.org/Projects/GnomeShellIntegrationForChrome";
longDescription = ''
To use the integration, install the <link xlink:href="https://wiki.gnome.org/Projects/GnomeShellIntegrationForChrome/Installation">browser extension</link>, and then set <option>services.gnome.chrome-gnome-shell.enable</option> to <literal>true</literal>.
'';
license = licenses.gpl3;
maintainers = teams.gnome.members;
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,66 @@
{ stdenv
, lib
, fetchFromGitLab
, meson
, ninja
, python3
, gnome
, wrapGAppsNoGuiHook
, gobject-introspection
}:
let
inherit (python3.pkgs) buildPythonApplication pygobject3;
in
buildPythonApplication rec {
pname = "gnome-browser-connector";
version = "42.0";
format = "other";
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "nE0sIghT";
repo = "gnome-browser-connector";
rev = "v${version}";
sha256 = "pYbV/qCmSrM2nrrKxbxHnJYMDOiW0aeNbFlsm5kKWdk=";
};
nativeBuildInputs = [
meson
ninja
wrapGAppsNoGuiHook
gobject-introspection # for setup-hook
];
buildInputs = [
gnome.gnome-shell
gobject-introspection # for Gio typelib
];
pythonPath = [
pygobject3
];
postPatch = ''
patchShebangs contrib/merge_json.py
'';
dontWrapGApps = true;
# Arguments to be passed to `makeWrapper`, only used by buildPython*
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
meta = with lib; {
description = "Native host connector for the GNOME Shell browser extension";
homepage = "https://wiki.gnome.org/Projects/GnomeShellIntegration";
longDescription = ''
To use the integration, install the <link xlink:href="https://wiki.gnome.org/Projects/GnomeShellIntegration/Installation">browser extension</link>, and then set <option>services.gnome.gnome-browser-connector.enable</option> to <literal>true</literal>.
'';
license = licenses.gpl3Plus;
maintainers = teams.gnome.members;
platforms = platforms.linux;
};
}

View file

@ -153,6 +153,8 @@ mapAliases ({
catfish = throw "'catfish' has been renamed to/replaced by 'xfce.catfish'"; # Converted to throw 2022-09-24
cde-gtk-theme = throw "cde-gtk-theme has been removed from nixpkgs as it shipped with python2 scripts that didn't work anymore"; # Added 2022-01-12
checkbashism = throw "'checkbashism' has been renamed to/replaced by 'checkbashisms'"; # Converted to throw 2022-02-22
chrome-gnome-shell = gnome-browser-connector; # Added 2022-07-27
chronos = throw "chronos has been removed from nixpkgs, as it was unmaintained"; # Added 2020-08-15
chunkwm = throw "chunkwm has been removed: abandoned by upstream"; # Added 2022-01-07
cifs_utils = throw "'cifs_utils' has been renamed to/replaced by 'cifs-utils'"; # Converted to throw 2022-02-22
cipherscan = throw "cipherscan was removed from nixpkgs, as it was unmaintained"; # added 2021-12-11

View file

@ -34564,7 +34564,7 @@ with pkgs;
gnome-tour = callPackage ../desktops/gnome/core/gnome-tour { };
chrome-gnome-shell = callPackage ../desktops/gnome/extensions/chrome-gnome-shell { };
gnome-browser-connector = callPackage ../desktops/gnome/extensions/gnome-browser-connector { };
gnome-2048 = callPackage ../desktops/gnome/games/gnome-2048 { };