From c8683da483b4595976c40b2e4e79a5ea13ee4994 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Wed, 13 May 2020 16:45:55 +0200 Subject: [PATCH 1/2] chrome-gnome-shell: clean up * format with nixpkgs-fmt * reorder attributes * inline version --- .../extensions/chrome-gnome-shell/default.nix | 48 ++++++++++++++----- 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/pkgs/desktops/gnome-3/extensions/chrome-gnome-shell/default.nix b/pkgs/desktops/gnome-3/extensions/chrome-gnome-shell/default.nix index 1e3815705cd3..ee0bb82b284a 100644 --- a/pkgs/desktops/gnome-3/extensions/chrome-gnome-shell/default.nix +++ b/pkgs/desktops/gnome-3/extensions/chrome-gnome-shell/default.nix @@ -1,29 +1,53 @@ -{stdenv, fetchurl, cmake, ninja, jq, python3, gnome3, wrapGAppsHook}: +{ stdenv +, fetchurl +, cmake +, ninja +, jq +, python3 +, gnome3 +, wrapGAppsHook +}: let - version = "10.1"; - inherit (python3.pkgs) python pygobject3 requests; -in stdenv.mkDerivation rec { +in +stdenv.mkDerivation rec { pname = "chrome-gnome-shell"; - inherit version; + version = "10.1"; src = fetchurl { url = "mirror://gnome/sources/chrome-gnome-shell/${version}/${pname}-${version}.tar.xz"; sha256 = "0f54xyamm383ypbh0ndkza0pif6ljddg2f947p265fkqj3p4zban"; }; - nativeBuildInputs = [ cmake ninja jq wrapGAppsHook ]; - buildInputs = [ gnome3.gnome-shell python pygobject3 requests ]; + nativeBuildInputs = [ + cmake + ninja + jq + wrapGAppsHook + ]; + + buildInputs = [ + gnome3.gnome-shell + python + pygobject3 + requests + ]; + + 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" ''; - # cmake setup hook changes /etc/opt into /var/empty - dontFixCmake = true; - - cmakeFlags = [ "-DBUILD_EXTENSION=OFF" ]; - wrapPrefixVariables = [ "PYTHONPATH" ]; passthru = { updateScript = gnome3.updateScript { From 5df7471c149cb4f20bc1cf292dbb038b66404110 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Wed, 13 May 2020 16:48:47 +0200 Subject: [PATCH 2/2] chrome-gnome-shell: Fix missing introspection data MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It was crashing with: TypeError: gobject `__main__+ChromeGNOMEShell' doesn't support property `application_id' – that is the constructor of parent class Gio.Application does not recognize the kwarg. This is typically caused by missing pygobject overrides but I think ones for Gio are built-in into pygobject. Even weirder, adding just `${gobject-introspection}/lib/girepository-1.0` seems to fix the issue so it might be missing the whole typelib. But then why does not it fail when importing it? from gi.repository import GLib, Gio For now, I am adding the Gio typelib which should been done from the start but more debugging should be done since weirdness like this can bring more bugs. Fixes: https://github.com/NixOS/nixpkgs/issues/87740 --- .../desktops/gnome-3/extensions/chrome-gnome-shell/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/desktops/gnome-3/extensions/chrome-gnome-shell/default.nix b/pkgs/desktops/gnome-3/extensions/chrome-gnome-shell/default.nix index ee0bb82b284a..5308d4bee5ac 100644 --- a/pkgs/desktops/gnome-3/extensions/chrome-gnome-shell/default.nix +++ b/pkgs/desktops/gnome-3/extensions/chrome-gnome-shell/default.nix @@ -6,6 +6,7 @@ , python3 , gnome3 , wrapGAppsHook +, gobject-introspection }: let @@ -25,6 +26,7 @@ stdenv.mkDerivation rec { ninja jq wrapGAppsHook + gobject-introspection # for setup-hook ]; buildInputs = [ @@ -32,6 +34,7 @@ stdenv.mkDerivation rec { python pygobject3 requests + gobject-introspection # for Gio typelib ]; cmakeFlags = [