From 8cddeef571c38ffa7b147779774618f1b8296674 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Mon, 13 Jul 2020 09:19:53 +0200 Subject: [PATCH 1/4] gnome3.gnome-shell: Format with nixpkgs-fmt Also reorder and stop using aliases for pkg-config and docbook-xsl-{,no}ns. --- .../gnome-3/core/gnome-shell/default.nix | 181 +++++++++++++----- 1 file changed, 137 insertions(+), 44 deletions(-) diff --git a/pkgs/desktops/gnome-3/core/gnome-shell/default.nix b/pkgs/desktops/gnome-3/core/gnome-shell/default.nix index b734a60cc26..ae062313cb9 100644 --- a/pkgs/desktops/gnome-3/core/gnome-shell/default.nix +++ b/pkgs/desktops/gnome-3/core/gnome-shell/default.nix @@ -1,21 +1,74 @@ -{ fetchurl, fetchpatch, substituteAll, stdenv, meson, ninja, pkgconfig, gnome3, json-glib, gettext, libsecret -, python3, libsoup, polkit, clutter, networkmanager, docbook_xsl , docbook_xsl_ns, at-spi2-core -, libstartup_notification, telepathy-glib, telepathy-logger, libXtst, unzip, glibcLocales, shared-mime-info -, libgweather, libcanberra-gtk3, librsvg, geoclue2, perl, docbook_xml_dtd_42, desktop-file-utils -, libpulseaudio, libical, gobject-introspection, wrapGAppsHook, libxslt, gcr -, accountsservice, gdk-pixbuf, gdm, upower, ibus, libnma, libgnomekbd, gnome-desktop -, gsettings-desktop-schemas, gnome-keyring, glib, gjs, mutter, evolution-data-server, gtk3 -, sassc, systemd, gst_all_1, adwaita-icon-theme, gnome-bluetooth, gnome-clocks, gnome-settings-daemon -, gnome-autoar, asciidoc-full +{ fetchurl +, fetchpatch +, substituteAll +, stdenv +, meson +, ninja +, pkg-config +, gnome3 +, json-glib +, gettext +, libsecret +, python3 +, libsoup +, polkit +, clutter +, networkmanager +, docbook-xsl-nons +, docbook-xsl-ns +, at-spi2-core +, libstartup_notification +, telepathy-glib +, telepathy-logger +, libXtst +, unzip +, glibcLocales +, shared-mime-info +, libgweather +, libcanberra-gtk3 +, librsvg +, geoclue2 +, perl +, docbook_xml_dtd_42 +, desktop-file-utils +, libpulseaudio +, libical +, gobject-introspection +, wrapGAppsHook +, libxslt +, gcr +, accountsservice +, gdk-pixbuf +, gdm +, upower +, ibus +, libnma +, libgnomekbd +, gnome-desktop +, gsettings-desktop-schemas +, gnome-keyring +, glib +, gjs +, mutter +, evolution-data-server +, gtk3 +, sassc +, systemd +, gst_all_1 +, adwaita-icon-theme +, gnome-bluetooth +, gnome-clocks +, gnome-settings-daemon +, gnome-autoar +, asciidoc-full , bash-completion }: # http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/gnome-base/gnome-shell/gnome-shell-3.10.2.1.ebuild?revision=1.3&view=markup - let - pythonEnv = python3.withPackages ( ps: with ps; [ pygobject3 ] ); - -in stdenv.mkDerivation rec { + pythonEnv = python3.withPackages (ps: with ps; [ pygobject3 ]); +in +stdenv.mkDerivation rec { pname = "gnome-shell"; version = "3.36.4"; @@ -24,37 +77,6 @@ in stdenv.mkDerivation rec { sha256 = "1nyibrr98ijn65z9ki0k7xzcwcliwy2jqssz0l0jalpbkhnr751d"; }; - LANG = "en_US.UTF-8"; - - nativeBuildInputs = [ - meson ninja pkgconfig gettext docbook_xsl docbook_xsl_ns docbook_xml_dtd_42 perl wrapGAppsHook glibcLocales - sassc desktop-file-utils libxslt.bin python3 asciidoc-full - ]; - buildInputs = [ - systemd - gsettings-desktop-schemas gnome-keyring glib gcr json-glib accountsservice - libsecret libsoup polkit gdk-pixbuf librsvg - networkmanager libstartup_notification telepathy-glib - libXtst gjs mutter libpulseaudio evolution-data-server - libical gtk3 gdm libcanberra-gtk3 geoclue2 - adwaita-icon-theme gnome-bluetooth - gnome-clocks # schemas needed - at-spi2-core upower ibus gnome-desktop telepathy-logger gnome-settings-daemon - gobject-introspection - gnome-autoar - - # recording - gst_all_1.gstreamer - gst_all_1.gst-plugins-base - gst_all_1.gst-plugins-good - - # not declared at build time, but typelib is needed at runtime - libgweather libnma - - # for gnome-extension tool - bash-completion - ]; - patches = [ # Hardcode paths to various dependencies so that they can be found at runtime. (substituteAll { @@ -86,6 +108,77 @@ in stdenv.mkDerivation rec { }) ]; + nativeBuildInputs = [ + meson + ninja + pkg-config + gettext + docbook-xsl-nons + docbook-xsl-ns + docbook_xml_dtd_42 + perl + wrapGAppsHook + glibcLocales + sassc + desktop-file-utils + libxslt.bin + python3 + asciidoc-full + ]; + + buildInputs = [ + systemd + gsettings-desktop-schemas + gnome-keyring + glib + gcr + json-glib + accountsservice + libsecret + libsoup + polkit + gdk-pixbuf + librsvg + networkmanager + libstartup_notification + telepathy-glib + libXtst + gjs + mutter + libpulseaudio + evolution-data-server + libical + gtk3 + gdm + libcanberra-gtk3 + geoclue2 + adwaita-icon-theme + gnome-bluetooth + gnome-clocks # schemas needed + at-spi2-core + upower + ibus + gnome-desktop + telepathy-logger + gnome-settings-daemon + gobject-introspection + gnome-autoar + + # recording + gst_all_1.gstreamer + gst_all_1.gst-plugins-base + gst_all_1.gst-plugins-good + + # not declared at build time, but typelib is needed at runtime + libgweather + libnma + + # for gnome-extension tool + bash-completion + ]; + + LANG = "en_US.UTF-8"; + postPatch = '' patchShebangs src/data-to-c.pl chmod +x meson/postinstall.py From 0937ea6dabf6cb78bd616cb2f6e36dd6852085b2 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Mon, 13 Jul 2020 09:42:02 +0200 Subject: [PATCH 2/4] gnome3.gnome-shell: Clean up MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove the following dependencies: * libcanberra – https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/327 * libsoup – https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/234 * libXtst – https://gitlab.gnome.org/GNOME/gnome-shell/commit/9f5a2d8aca5ae91be4cad12e6a3d02e1ac26e39a * glibcLocales – no longer necessary since glibc now contains C.UTF-8 locale * docbook-xsl-ns – not sure why this was included but there are no complaints when this is removed Also move gnome-autoar & json-glib to proper section and drop unused clutter arg. --- .../gnome-3/core/gnome-shell/default.nix | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/pkgs/desktops/gnome-3/core/gnome-shell/default.nix b/pkgs/desktops/gnome-3/core/gnome-shell/default.nix index ae062313cb9..c59c6e0375a 100644 --- a/pkgs/desktops/gnome-3/core/gnome-shell/default.nix +++ b/pkgs/desktops/gnome-3/core/gnome-shell/default.nix @@ -10,22 +10,16 @@ , gettext , libsecret , python3 -, libsoup , polkit -, clutter , networkmanager , docbook-xsl-nons -, docbook-xsl-ns , at-spi2-core , libstartup_notification , telepathy-glib , telepathy-logger -, libXtst , unzip -, glibcLocales , shared-mime-info , libgweather -, libcanberra-gtk3 , librsvg , geoclue2 , perl @@ -114,11 +108,9 @@ stdenv.mkDerivation rec { pkg-config gettext docbook-xsl-nons - docbook-xsl-ns docbook_xml_dtd_42 perl wrapGAppsHook - glibcLocales sassc desktop-file-utils libxslt.bin @@ -132,17 +124,14 @@ stdenv.mkDerivation rec { gnome-keyring glib gcr - json-glib accountsservice libsecret - libsoup polkit gdk-pixbuf librsvg networkmanager libstartup_notification telepathy-glib - libXtst gjs mutter libpulseaudio @@ -150,7 +139,6 @@ stdenv.mkDerivation rec { libical gtk3 gdm - libcanberra-gtk3 geoclue2 adwaita-icon-theme gnome-bluetooth @@ -162,7 +150,6 @@ stdenv.mkDerivation rec { telepathy-logger gnome-settings-daemon gobject-introspection - gnome-autoar # recording gst_all_1.gstreamer @@ -175,10 +162,10 @@ stdenv.mkDerivation rec { # for gnome-extension tool bash-completion + gnome-autoar + json-glib ]; - LANG = "en_US.UTF-8"; - postPatch = '' patchShebangs src/data-to-c.pl chmod +x meson/postinstall.py From b49102008185a034288debe5726d7492fb56d163 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Mon, 13 Jul 2020 09:51:47 +0200 Subject: [PATCH 3/4] gnome3.gnome-shell: build docs --- pkgs/desktops/gnome-3/core/gnome-shell/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/desktops/gnome-3/core/gnome-shell/default.nix b/pkgs/desktops/gnome-3/core/gnome-shell/default.nix index c59c6e0375a..17f359e7d28 100644 --- a/pkgs/desktops/gnome-3/core/gnome-shell/default.nix +++ b/pkgs/desktops/gnome-3/core/gnome-shell/default.nix @@ -12,6 +12,7 @@ , python3 , polkit , networkmanager +, gtk-doc , docbook-xsl-nons , at-spi2-core , libstartup_notification @@ -23,7 +24,9 @@ , librsvg , geoclue2 , perl +, docbook_xml_dtd_412 , docbook_xml_dtd_42 +, docbook_xml_dtd_43 , desktop-file-utils , libpulseaudio , libical @@ -66,6 +69,8 @@ stdenv.mkDerivation rec { pname = "gnome-shell"; version = "3.36.4"; + outputs = [ "out" "devdoc" ]; + src = fetchurl { url = "mirror://gnome/sources/gnome-shell/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; sha256 = "1nyibrr98ijn65z9ki0k7xzcwcliwy2jqssz0l0jalpbkhnr751d"; @@ -108,7 +113,10 @@ stdenv.mkDerivation rec { pkg-config gettext docbook-xsl-nons + docbook_xml_dtd_412 docbook_xml_dtd_42 + docbook_xml_dtd_43 + gtk-doc perl wrapGAppsHook sassc @@ -166,6 +174,10 @@ stdenv.mkDerivation rec { json-glib ]; + mesonFlags = [ + "-Dgtk_doc=true" + ]; + postPatch = '' patchShebangs src/data-to-c.pl chmod +x meson/postinstall.py From 4a48684965b9ecc12ded7f9360b673dc7a9484ab Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Mon, 13 Jul 2020 10:13:31 +0200 Subject: [PATCH 4/4] gnome3.mutter: clean up MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * upower no longer used – https://gitlab.gnome.org/GNOME/mutter/commit/fa9e330f2c6d3ec34ff57b2c67a9c75c09401014 * only libcanbera, not libcanberra-gtk is used * cogl has been in-tree for ages * geocode-glib has not been used ever? * no need to have zenity in buildInputs, it is only needed in patch * move patches attr after src --- pkgs/desktops/gnome-3/core/mutter/default.nix | 34 +++++++------------ 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/pkgs/desktops/gnome-3/core/mutter/default.nix b/pkgs/desktops/gnome-3/core/mutter/default.nix index 569bde9b339..2a81c6fd23e 100644 --- a/pkgs/desktops/gnome-3/core/mutter/default.nix +++ b/pkgs/desktops/gnome-3/core/mutter/default.nix @@ -6,14 +6,12 @@ , gnome3 , gettext , gobject-introspection -, upower , cairo , pango -, cogl , json-glib , libstartup_notification , zenity -, libcanberra-gtk3 +, libcanberra , ninja , xkeyboard_config , libxkbfile @@ -24,7 +22,6 @@ , glib , gtk3 , gnome-desktop -, geocode-glib , pipewire , libgudev , libwacom @@ -53,6 +50,17 @@ stdenv.mkDerivation rec { sha256 = "0p3jglw6f2h67kwk89qz1rz23y25lip8m2mp2xshf2vrg4a930as"; }; + patches = [ + # Drop inheritable cap_sys_nice, to prevent the ambient set from leaking + # from mutter/gnome-shell, see https://github.com/NixOS/nixpkgs/issues/71381 + ./drop-inheritable.patch + + (substituteAll { + src = ./fix-paths.patch; + inherit zenity; + }) + ]; + mesonFlags = [ "-Degl_device=true" "-Dinstalled_tests=false" # TODO: enable these @@ -85,16 +93,14 @@ stdenv.mkDerivation rec { buildInputs = [ cairo - cogl egl-wayland - geocode-glib glib gnome-desktop gnome-settings-daemon gobject-introspection gsettings-desktop-schemas gtk3 - libcanberra-gtk3 + libcanberra libgudev libinput libstartup_notification @@ -104,25 +110,11 @@ stdenv.mkDerivation rec { pango pipewire sysprof - upower xkeyboard_config xwayland - zenity - zenity wayland-protocols ]; - patches = [ - # Drop inheritable cap_sys_nice, to prevent the ambient set from leaking - # from mutter/gnome-shell, see https://github.com/NixOS/nixpkgs/issues/71381 - ./drop-inheritable.patch - - (substituteAll { - src = ./fix-paths.patch; - inherit zenity; - }) - ]; - postPatch = '' patchShebangs src/backends/native/gen-default-modes.py '';