diff options
Diffstat (limited to 'pkgs/desktops/gnome/core')
81 files changed, 6255 insertions, 0 deletions
diff --git a/pkgs/desktops/gnome/core/adwaita-icon-theme/default.nix b/pkgs/desktops/gnome/core/adwaita-icon-theme/default.nix new file mode 100644 index 0000000000000..04f8a7a3c37b9 --- /dev/null +++ b/pkgs/desktops/gnome/core/adwaita-icon-theme/default.nix @@ -0,0 +1,36 @@ +{ lib, stdenv, fetchurl, pkg-config, intltool, gnome +, iconnamingutils, gtk3, gdk-pixbuf, librsvg, hicolor-icon-theme }: + +stdenv.mkDerivation rec { + pname = "adwaita-icon-theme"; + version = "40.1.1"; + + src = fetchurl { + url = "mirror://gnome/sources/adwaita-icon-theme/${lib.versions.major version}/${pname}-${version}.tar.xz"; + sha256 = "C2xDbtatmIeoitofcqAZex63OwINjTRKurTH+nJQ+PY="; + }; + + # For convenience, we can specify adwaita-icon-theme only in packages + propagatedBuildInputs = [ hicolor-icon-theme ]; + + buildInputs = [ gdk-pixbuf librsvg ]; + + nativeBuildInputs = [ pkg-config intltool iconnamingutils gtk3 ]; + + dontDropIconThemeCache = true; + + # remove a tree of dirs with no files within + postInstall = '' rm -rf "$out/locale" ''; + + passthru = { + updateScript = gnome.updateScript { + packageName = "adwaita-icon-theme"; + attrPath = "gnome.adwaita-icon-theme"; + }; + }; + + meta = with lib; { + platforms = with platforms; linux ++ darwin; + maintainers = teams.gnome.members; + }; +} diff --git a/pkgs/desktops/gnome/core/baobab/default.nix b/pkgs/desktops/gnome/core/baobab/default.nix new file mode 100644 index 0000000000000..8d0f9459c3b07 --- /dev/null +++ b/pkgs/desktops/gnome/core/baobab/default.nix @@ -0,0 +1,64 @@ +{ stdenv +, lib +, gettext +, fetchurl +, vala +, desktop-file-utils +, meson +, ninja +, pkg-config +, python3 +, gtk3 +, libhandy +, glib +, libxml2 +, wrapGAppsHook +, itstool +, gnome +}: + +stdenv.mkDerivation rec { + pname = "baobab"; + version = "40.0"; + + src = fetchurl { + url = "mirror://gnome/sources/${pname}/${lib.versions.major version}/${pname}-${version}.tar.xz"; + sha256 = "19yii3bdgivxrcka1c4g6dpbmql5nyawwhzlsph7z6bs68nambm6"; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + vala + gettext + itstool + libxml2 + desktop-file-utils + wrapGAppsHook + python3 + ]; + + buildInputs = [ + gtk3 + libhandy + glib + gnome.adwaita-icon-theme + ]; + + doCheck = true; + + passthru = { + updateScript = gnome.updateScript { + packageName = pname; + }; + }; + + meta = with lib; { + description = "Graphical application to analyse disk usage in any GNOME environment"; + homepage = "https://wiki.gnome.org/Apps/DiskUsageAnalyzer"; + license = licenses.gpl2Plus; + maintainers = teams.gnome.members; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome/core/caribou/default.nix b/pkgs/desktops/gnome/core/caribou/default.nix new file mode 100644 index 0000000000000..5985ff8226677 --- /dev/null +++ b/pkgs/desktops/gnome/core/caribou/default.nix @@ -0,0 +1,54 @@ +{ fetchurl, lib, stdenv, pkg-config, gnome, glib, gtk3, clutter, dbus, python3, libxml2 +, libxklavier, libXtst, gtk2, intltool, libxslt, at-spi2-core, autoreconfHook +, wrapGAppsHook, libgee }: + +let + pname = "caribou"; + version = "0.4.21"; + pythonEnv = python3.withPackages ( ps: with ps; [ pygobject3 ] ); +in stdenv.mkDerivation rec { + name = "${pname}-${version}"; + + src = fetchurl { + url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${name}.tar.xz"; + sha256 = "0mfychh1q3dx0b96pjz9a9y112bm9yqyim40yykzxx1hppsdjhww"; + }; + + patches = [ + # Fix crash in GNOME Flashback + # https://bugzilla.gnome.org/show_bug.cgi?id=791001 + (fetchurl { + url = "https://bugzilla.gnome.org/attachment.cgi?id=364774"; + sha256 = "15k1455grf6knlrxqbjnk7sals1730b0whj30451scp46wyvykvd"; + }) + ]; + + nativeBuildInputs = [ pkg-config intltool libxslt libxml2 autoreconfHook wrapGAppsHook ]; + + buildInputs = [ + glib gtk3 clutter at-spi2-core dbus pythonEnv python3.pkgs.pygobject3 + libXtst gtk2 + ]; + + propagatedBuildInputs = [ libgee libxklavier ]; + + postPatch = '' + patchShebangs . + substituteInPlace libcaribou/Makefile.am --replace "--shared-library=libcaribou.so.0" "--shared-library=$out/lib/libcaribou.so.0" + ''; + + passthru = { + updateScript = gnome.updateScript { + packageName = pname; + attrPath = "gnome.${pname}"; + }; + }; + + meta = with lib; { + description = "An input assistive technology intended for switch and pointer users"; + homepage = "https://wiki.gnome.org/Projects/Caribou"; + license = licenses.lgpl21; + maintainers = teams.gnome.members; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome/core/dconf-editor/default.nix b/pkgs/desktops/gnome/core/dconf-editor/default.nix new file mode 100644 index 0000000000000..165980d7e9c13 --- /dev/null +++ b/pkgs/desktops/gnome/core/dconf-editor/default.nix @@ -0,0 +1,69 @@ +{ lib +, stdenv +, fetchurl +, meson +, ninja +, vala +, libxslt +, pkg-config +, glib +, gtk3 +, gnome +, python3 +, dconf +, libxml2 +, gettext +, docbook-xsl-nons +, wrapGAppsHook +, gobject-introspection +}: + +stdenv.mkDerivation rec { + pname = "dconf-editor"; + version = "3.38.3"; + + src = fetchurl { + url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; + sha256 = "sha256-Vxr0x9rU8Em1PmzXKLea3fCMJ92ra8V7OW0hGGbueeM="; + }; + + nativeBuildInputs = [ + meson + ninja + vala + libxslt + pkg-config + wrapGAppsHook + gettext + docbook-xsl-nons + libxml2 + gobject-introspection + python3 + ]; + + buildInputs = [ + glib + gtk3 + dconf + ]; + + postPatch = '' + chmod +x meson_post_install.py + patchShebangs meson_post_install.py + ''; + + passthru = { + updateScript = gnome.updateScript { + packageName = pname; + attrPath = "gnome.${pname}"; + }; + }; + + meta = with lib; { + description = "GSettings editor for GNOME"; + homepage = "https://wiki.gnome.org/Apps/DconfEditor"; + license = licenses.gpl3Plus; + maintainers = teams.gnome.members; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome/core/empathy/default.nix b/pkgs/desktops/gnome/core/empathy/default.nix new file mode 100644 index 0000000000000..fbfee37cd13e9 --- /dev/null +++ b/pkgs/desktops/gnome/core/empathy/default.nix @@ -0,0 +1,147 @@ +{ lib, stdenv +, intltool +, fetchurl +, webkitgtk +, pkg-config +, gtk3 +, glib +, file +, librsvg +, gnome +, gdk-pixbuf +, python3 +, telepathy-glib +, telepathy-farstream +, clutter-gtk +, clutter-gst +, gst_all_1 +, cogl +, gnome-online-accounts +, gcr +, libsecret +, folks +, libpulseaudio +, telepathy-mission-control +, telepathy-logger +, libnotify +, clutter +, libsoup +, gnutls +, evolution-data-server +, yelp-xsl +, libcanberra-gtk3 +, p11-kit +, farstream +, libtool +, shared-mime-info +, wrapGAppsHook +, itstool +, libxml2 +, libxslt +, icu +, libgee +, gsettings-desktop-schemas +, isocodes +, enchant +, libchamplain +, geoclue2 +, geocode-glib +, cheese +, libgudev +}: + +stdenv.mkDerivation rec { + pname = "empathy"; + version = "3.25.90"; + + src = fetchurl { + url = "mirror://gnome/sources/empathy/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; + sha256 = "0sn10fcymc6lyrabk7vx8lpvlaxxkqnmcwj9zdkfa8qf3388k4nc"; + }; + + propagatedBuildInputs = [ + (folks.override { telepathySupport = true; }) + telepathy-logger + evolution-data-server + telepathy-mission-control + ]; + + nativeBuildInputs = [ + pkg-config + libtool + intltool + itstool + file + wrapGAppsHook + libxml2 + libxslt + yelp-xsl + python3 + ]; + + buildInputs = [ + gtk3 + glib + webkitgtk + icu + gnome-online-accounts + telepathy-glib + clutter-gtk + clutter-gst + cogl + gst_all_1.gstreamer + gst_all_1.gst-plugins-base + gcr + libsecret + libpulseaudio + gdk-pixbuf + libnotify + clutter + libsoup + gnutls + libgee + p11-kit + libcanberra-gtk3 + telepathy-farstream + farstream + gnome.adwaita-icon-theme + gsettings-desktop-schemas + librsvg + + # Spell-checking + enchant + isocodes + + # Display maps, location awareness, geocode support + libchamplain + geoclue2 + geocode-glib + + # Cheese webcam support, camera monitoring + cheese + libgudev + ]; + + enableParallelBuilding = true; + + preFixup = '' + gappsWrapperArgs+=( + --prefix XDG_DATA_DIRS : "${shared-mime-info}/share" + ) + ''; + + passthru = { + updateScript = gnome.updateScript { + packageName = "empathy"; + versionPolicy = "none"; + }; + }; + + meta = with lib; { + homepage = "https://wiki.gnome.org/Apps/Empathy"; + description = "Messaging program which supports text, voice, video chat, and file transfers over many different protocols"; + maintainers = teams.gnome.members; + license = [ licenses.gpl2 ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome/core/eog/default.nix b/pkgs/desktops/gnome/core/eog/default.nix new file mode 100644 index 0000000000000..426a878335289 --- /dev/null +++ b/pkgs/desktops/gnome/core/eog/default.nix @@ -0,0 +1,95 @@ +{ lib, stdenv +, fetchurl +, meson +, ninja +, gettext +, itstool +, pkg-config +, libxml2 +, libjpeg +, libpeas +, libportal +, gnome +, gtk3 +, glib +, gsettings-desktop-schemas +, adwaita-icon-theme +, gnome-desktop +, lcms2 +, gdk-pixbuf +, exempi +, shared-mime-info +, wrapGAppsHook +, librsvg +, libexif +, gobject-introspection +, python3 +}: + +stdenv.mkDerivation rec { + pname = "eog"; + version = "40.1"; + + src = fetchurl { + url = "mirror://gnome/sources/${pname}/${lib.versions.major version}/${pname}-${version}.tar.xz"; + sha256 = "sha256-e+CGA3/tm2v4S6yXqD48kYMBt+nJavEwsnJS0KURFok="; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + gettext + itstool + wrapGAppsHook + libxml2 + gobject-introspection + python3 + ]; + + buildInputs = [ + libjpeg + libportal + gtk3 + gdk-pixbuf + glib + libpeas + librsvg + lcms2 + gnome-desktop + libexif + exempi + gsettings-desktop-schemas + shared-mime-info + adwaita-icon-theme + ]; + + postPatch = '' + chmod +x meson_post_install.py + patchShebangs meson_post_install.py + ''; + + preFixup = '' + gappsWrapperArgs+=( + # Thumbnailers + --prefix XDG_DATA_DIRS : "${gdk-pixbuf}/share" + --prefix XDG_DATA_DIRS : "${librsvg}/share" + --prefix XDG_DATA_DIRS : "${shared-mime-info}/share" + ) + ''; + + passthru = { + updateScript = gnome.updateScript { + packageName = pname; + attrPath = "gnome.${pname}"; + }; + }; + + meta = with lib; { + description = "GNOME image viewer"; + homepage = "https://wiki.gnome.org/Apps/EyeOfGnome"; + license = licenses.gpl2Plus; + maintainers = teams.gnome.members; + platforms = platforms.unix; + }; +} diff --git a/pkgs/desktops/gnome/core/epiphany/default.nix b/pkgs/desktops/gnome/core/epiphany/default.nix new file mode 100644 index 0000000000000..f286d384c4e80 --- /dev/null +++ b/pkgs/desktops/gnome/core/epiphany/default.nix @@ -0,0 +1,115 @@ +{ lib, stdenv +, meson +, ninja +, gettext +, fetchurl +, pkg-config +, gtk3 +, glib +, icu +, wrapGAppsHook +, gnome +, libportal +, libxml2 +, libxslt +, itstool +, webkitgtk +, libsoup +, glib-networking +, libsecret +, gnome-desktop +, libnotify +, libarchive +, p11-kit +, sqlite +, gcr +, isocodes +, desktop-file-utils +, python3 +, nettle +, gdk-pixbuf +, gst_all_1 +, json-glib +, libdazzle +, libhandy +, buildPackages +}: + +stdenv.mkDerivation rec { + pname = "epiphany"; + version = "40.1"; + + src = fetchurl { + url = "mirror://gnome/sources/${pname}/${lib.versions.major version}/${pname}-${version}.tar.xz"; + sha256 = "1l0sb1xg16g4wg3z99xb0w2kbyczbn7q4mphs3w4lxq22xml4sk9"; + }; + + nativeBuildInputs = [ + desktop-file-utils + gettext + itstool + libxslt + meson + ninja + pkg-config + python3 + wrapGAppsHook + buildPackages.glib + buildPackages.gtk3 + ]; + + buildInputs = [ + gcr + gdk-pixbuf + glib + glib-networking + gnome-desktop + gnome.adwaita-icon-theme + gst_all_1.gst-libav + gst_all_1.gst-plugins-bad + gst_all_1.gst-plugins-base + gst_all_1.gst-plugins-good + gst_all_1.gst-plugins-ugly + gst_all_1.gstreamer + gtk3 + icu + isocodes + json-glib + libdazzle + libhandy + libportal + libnotify + libarchive + libsecret + libsoup + libxml2 + nettle + p11-kit + sqlite + webkitgtk + ]; + + # Tests need an X display + mesonFlags = [ + "-Dunit_tests=disabled" + ]; + + postPatch = '' + chmod +x post_install.py # patchShebangs requires executable file + patchShebangs post_install.py + ''; + + passthru = { + updateScript = gnome.updateScript { + packageName = pname; + }; + }; + + meta = with lib; { + homepage = "https://wiki.gnome.org/Apps/Epiphany"; + description = "WebKit based web browser for GNOME"; + maintainers = teams.gnome.members; + license = licenses.gpl3Plus; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome/core/evince/default.nix b/pkgs/desktops/gnome/core/evince/default.nix new file mode 100644 index 0000000000000..3d7f3e0b8356c --- /dev/null +++ b/pkgs/desktops/gnome/core/evince/default.nix @@ -0,0 +1,135 @@ +{ lib, stdenv +, fetchurl +, meson +, ninja +, pkg-config +, gettext +, libxml2 +, appstream +, glib +, gtk3 +, pango +, atk +, gdk-pixbuf +, shared-mime-info +, itstool +, gnome +, poppler +, ghostscriptX +, djvulibre +, libspectre +, libarchive +, libhandy +, libsecret +, wrapGAppsHook +, librsvg +, gobject-introspection +, yelp-tools +, gspell +, adwaita-icon-theme +, gsettings-desktop-schemas +, gnome-desktop +, dbus +, python3 +, texlive +, t1lib +, gst_all_1 +, gtk-doc +, docbook-xsl-nons +, docbook_xml_dtd_43 +, supportMultimedia ? true # PDF multimedia +, libgxps +, supportXPS ? true # Open XML Paper Specification via libgxps +}: + +stdenv.mkDerivation rec { + pname = "evince"; + version = "40.1"; + + outputs = [ "out" "dev" "devdoc" ]; + + src = fetchurl { + url = "mirror://gnome/sources/evince/${lib.versions.major version}/${pname}-${version}.tar.xz"; + sha256 = "0bfg7prmjk3z8irx1nfkkqph3igg3cy4pwd7pcxjxbshqdin6rks"; + }; + + postPatch = '' + chmod +x meson_post_install.py + patchShebangs meson_post_install.py + ''; + + nativeBuildInputs = [ + appstream + docbook-xsl-nons + docbook_xml_dtd_43 + gettext + gobject-introspection + gtk-doc + itstool + meson + ninja + pkg-config + python3 + wrapGAppsHook + yelp-tools + ]; + + buildInputs = [ + adwaita-icon-theme + atk + dbus # only needed to find the service directory + djvulibre + gdk-pixbuf + ghostscriptX + glib + gnome-desktop + gsettings-desktop-schemas + gspell + gtk3 + libarchive + libhandy + librsvg + libsecret + libspectre + libxml2 + pango + poppler + t1lib + texlive.bin.core # kpathsea for DVI support + ] ++ lib.optional supportXPS libgxps + ++ lib.optionals supportMultimedia (with gst_all_1; [ + gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav ]); + + mesonFlags = [ + "-Dnautilus=false" + "-Dps=enabled" + ]; + + NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; + + preFixup = '' + gappsWrapperArgs+=(--prefix XDG_DATA_DIRS : "${shared-mime-info}/share") + ''; + + passthru = { + updateScript = gnome.updateScript { + packageName = pname; + }; + }; + + meta = with lib; { + homepage = "https://wiki.gnome.org/Apps/Evince"; + description = "GNOME's document viewer"; + + longDescription = '' + Evince is a document viewer for multiple document formats. It + currently supports PDF, PostScript, DjVu, TIFF and DVI. The goal + of Evince is to replace the multiple document viewers that exist + on the GNOME Desktop with a single simple application. + ''; + + license = lib.licenses.gpl2Plus; + platforms = platforms.linux; + maintainers = teams.gnome.members; + }; +} diff --git a/pkgs/desktops/gnome/core/evolution-data-server/default.nix b/pkgs/desktops/gnome/core/evolution-data-server/default.nix new file mode 100644 index 0000000000000..0ed3565d7f039 --- /dev/null +++ b/pkgs/desktops/gnome/core/evolution-data-server/default.nix @@ -0,0 +1,66 @@ +{ fetchurl, lib, stdenv, substituteAll, pkg-config, gnome, python3, gobject-introspection +, intltool, libsoup, libxml2, libsecret, icu, sqlite, tzdata, libcanberra-gtk3, gcr, p11-kit +, db, nspr, nss, libical, gperf, wrapGAppsHook, glib-networking, pcre, vala, cmake, ninja +, libkrb5, openldap, webkitgtk, libaccounts-glib, json-glib, glib, gtk3, libphonenumber +, gnome-online-accounts, libgweather, libgdata, gsettings-desktop-schemas, boost, protobuf }: + +stdenv.mkDerivation rec { + pname = "evolution-data-server"; + version = "3.40.1"; + + outputs = [ "out" "dev" ]; + + src = fetchurl { + url = "mirror://gnome/sources/evolution-data-server/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; + sha256 = "08iykha7zhk21b3axsp3v1jfwda612v0m8rz8zlzppm5i8s5ziza"; + }; + + patches = [ + (substituteAll { + src = ./fix-paths.patch; + inherit tzdata; + }) + ]; + + prePatch = '' + substitute ${./hardcode-gsettings.patch} hardcode-gsettings.patch --subst-var-by ESD_GSETTINGS_PATH ${glib.makeSchemaPath "$out" "${pname}-${version}"} \ + --subst-var-by GDS_GSETTINGS_PATH ${glib.getSchemaPath gsettings-desktop-schemas} + patches="$patches $PWD/hardcode-gsettings.patch" + ''; + + nativeBuildInputs = [ + cmake ninja pkg-config intltool python3 gperf wrapGAppsHook gobject-introspection vala + ]; + buildInputs = [ + glib libsoup libxml2 gtk3 gnome-online-accounts + gcr p11-kit libgweather libgdata libaccounts-glib json-glib + icu sqlite libkrb5 openldap webkitgtk glib-networking + libcanberra-gtk3 pcre libphonenumber boost protobuf + ]; + + propagatedBuildInputs = [ libsecret nss nspr libical db libsoup ]; + + cmakeFlags = [ + "-DENABLE_UOA=OFF" + "-DENABLE_VALA_BINDINGS=ON" + "-DENABLE_INTROSPECTION=ON" + "-DCMAKE_SKIP_BUILD_RPATH=OFF" + "-DINCLUDE_INSTALL_DIR=${placeholder "dev"}/include" + "-DWITH_PHONENUMBER=ON" + ]; + + passthru = { + updateScript = gnome.updateScript { + packageName = "evolution-data-server"; + versionPolicy = "odd-unstable"; + }; + }; + + meta = with lib; { + description = "Unified backend for programs that work with contacts, tasks, and calendar information"; + homepage = "https://wiki.gnome.org/Apps/Evolution"; + license = licenses.lgpl2; + maintainers = teams.gnome.members; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome/core/evolution-data-server/fix-paths.patch b/pkgs/desktops/gnome/core/evolution-data-server/fix-paths.patch new file mode 100644 index 0000000000000..334235516591f --- /dev/null +++ b/pkgs/desktops/gnome/core/evolution-data-server/fix-paths.patch @@ -0,0 +1,11 @@ +--- a/src/calendar/libecal/e-cal-system-timezone.c ++++ b/src/calendar/libecal/e-cal-system-timezone.c +@@ -26,7 +26,7 @@ + #ifdef HAVE_SOLARIS + #define SYSTEM_ZONEINFODIR "/usr/share/lib/zoneinfo/tab" + #else +-#define SYSTEM_ZONEINFODIR "/usr/share/zoneinfo" ++#define SYSTEM_ZONEINFODIR "@tzdata@/share/zoneinfo" + #endif + + #define ETC_TIMEZONE "/etc/timezone" diff --git a/pkgs/desktops/gnome/core/evolution-data-server/hardcode-gsettings.patch b/pkgs/desktops/gnome/core/evolution-data-server/hardcode-gsettings.patch new file mode 100644 index 0000000000000..4e345c3cb3ca8 --- /dev/null +++ b/pkgs/desktops/gnome/core/evolution-data-server/hardcode-gsettings.patch @@ -0,0 +1,526 @@ +diff --git a/src/addressbook/libebook/e-book-client.c b/src/addressbook/libebook/e-book-client.c +index 2c0557c3c..5955aa55e 100644 +--- a/src/addressbook/libebook/e-book-client.c ++++ b/src/addressbook/libebook/e-book-client.c +@@ -1989,7 +1989,20 @@ e_book_client_get_self (ESourceRegistry *registry, + + *out_client = book_client; + +- settings = g_settings_new (SELF_UID_PATH_ID); ++ { ++ GSettingsSchemaSource *schema_source; ++ GSettingsSchema *schema; ++ schema_source = g_settings_schema_source_new_from_directory("@ESD_GSETTINGS_PATH@", ++ g_settings_schema_source_get_default(), ++ TRUE, ++ NULL); ++ schema = g_settings_schema_source_lookup(schema_source, ++ SELF_UID_PATH_ID, ++ FALSE); ++ settings = g_settings_new_full(schema, NULL, NULL); ++ g_settings_schema_source_unref(schema_source); ++ g_settings_schema_unref(schema); ++ } + uid = g_settings_get_string (settings, SELF_UID_KEY); + g_object_unref (settings); + +@@ -2057,7 +2070,20 @@ e_book_client_set_self (EBookClient *client, + g_return_val_if_fail ( + e_contact_get_const (contact, E_CONTACT_UID) != NULL, FALSE); + +- settings = g_settings_new (SELF_UID_PATH_ID); ++ { ++ GSettingsSchemaSource *schema_source; ++ GSettingsSchema *schema; ++ schema_source = g_settings_schema_source_new_from_directory("@ESD_GSETTINGS_PATH@", ++ g_settings_schema_source_get_default(), ++ TRUE, ++ NULL); ++ schema = g_settings_schema_source_lookup(schema_source, ++ SELF_UID_PATH_ID, ++ FALSE); ++ settings = g_settings_new_full(schema, NULL, NULL); ++ g_settings_schema_source_unref(schema_source); ++ g_settings_schema_unref(schema); ++ } + g_settings_set_string ( + settings, SELF_UID_KEY, + e_contact_get_const (contact, E_CONTACT_UID)); +@@ -2093,8 +2119,20 @@ e_book_client_is_self (EContact *contact) + * unfortunately the API doesn't allow that. + */ + g_mutex_lock (&mutex); +- if (!settings) +- settings = g_settings_new (SELF_UID_PATH_ID); ++ if (!settings) { ++ GSettingsSchemaSource *schema_source; ++ GSettingsSchema *schema; ++ schema_source = g_settings_schema_source_new_from_directory("@ESD_GSETTINGS_PATH@", ++ g_settings_schema_source_get_default(), ++ TRUE, ++ NULL); ++ schema = g_settings_schema_source_lookup(schema_source, ++ SELF_UID_PATH_ID, ++ FALSE); ++ settings = g_settings_new_full(schema, NULL, NULL); ++ g_settings_schema_source_unref(schema_source); ++ g_settings_schema_unref(schema); ++ } + uid = g_settings_get_string (settings, SELF_UID_KEY); + g_mutex_unlock (&mutex); + +diff --git a/src/addressbook/libebook/e-book.c b/src/addressbook/libebook/e-book.c +index 3396b57c0..ac6420b2e 100644 +--- a/src/addressbook/libebook/e-book.c ++++ b/src/addressbook/libebook/e-book.c +@@ -2594,7 +2594,20 @@ e_book_get_self (ESourceRegistry *registry, + return FALSE; + } + +- settings = g_settings_new (SELF_UID_PATH_ID); ++ { ++ GSettingsSchemaSource *schema_source; ++ GSettingsSchema *schema; ++ schema_source = g_settings_schema_source_new_from_directory("@ESD_GSETTINGS_PATH@", ++ g_settings_schema_source_get_default(), ++ TRUE, ++ NULL); ++ schema = g_settings_schema_source_lookup(schema_source, ++ SELF_UID_PATH_ID, ++ FALSE); ++ settings = g_settings_new_full(schema, NULL, NULL); ++ g_settings_schema_source_unref(schema_source); ++ g_settings_schema_unref(schema); ++ } + uid = g_settings_get_string (settings, SELF_UID_KEY); + g_object_unref (settings); + +@@ -2649,7 +2662,20 @@ e_book_set_self (EBook *book, + g_return_val_if_fail (E_IS_BOOK (book), FALSE); + g_return_val_if_fail (E_IS_CONTACT (contact), FALSE); + +- settings = g_settings_new (SELF_UID_PATH_ID); ++ { ++ GSettingsSchemaSource *schema_source; ++ GSettingsSchema *schema; ++ schema_source = g_settings_schema_source_new_from_directory("@ESD_GSETTINGS_PATH@", ++ g_settings_schema_source_get_default(), ++ TRUE, ++ NULL); ++ schema = g_settings_schema_source_lookup(schema_source, ++ SELF_UID_PATH_ID, ++ FALSE); ++ settings = g_settings_new_full(schema, NULL, NULL); ++ g_settings_schema_source_unref(schema_source); ++ g_settings_schema_unref(schema); ++ } + g_settings_set_string ( + settings, SELF_UID_KEY, + e_contact_get_const (contact, E_CONTACT_UID)); +@@ -2677,7 +2703,20 @@ e_book_is_self (EContact *contact) + + g_return_val_if_fail (E_IS_CONTACT (contact), FALSE); + +- settings = g_settings_new (SELF_UID_PATH_ID); ++ { ++ GSettingsSchemaSource *schema_source; ++ GSettingsSchema *schema; ++ schema_source = g_settings_schema_source_new_from_directory("@ESD_GSETTINGS_PATH@", ++ g_settings_schema_source_get_default(), ++ TRUE, ++ NULL); ++ schema = g_settings_schema_source_lookup(schema_source, ++ SELF_UID_PATH_ID, ++ FALSE); ++ settings = g_settings_new_full(schema, NULL, NULL); ++ g_settings_schema_source_unref(schema_source); ++ g_settings_schema_unref(schema); ++ } + uid = g_settings_get_string (settings, SELF_UID_KEY); + g_object_unref (settings); + +diff --git a/src/calendar/backends/contacts/e-cal-backend-contacts.c b/src/calendar/backends/contacts/e-cal-backend-contacts.c +index de1716941..e83b104f1 100644 +--- a/src/calendar/backends/contacts/e-cal-backend-contacts.c ++++ b/src/calendar/backends/contacts/e-cal-backend-contacts.c +@@ -1397,7 +1397,20 @@ e_cal_backend_contacts_init (ECalBackendContacts *cbc) + (GDestroyNotify) g_free, + (GDestroyNotify) contact_record_free); + +- cbc->priv->settings = g_settings_new ("org.gnome.evolution-data-server.calendar"); ++ { ++ GSettingsSchemaSource *schema_source; ++ GSettingsSchema *schema; ++ schema_source = g_settings_schema_source_new_from_directory("@ESD_GSETTINGS_PATH@", ++ g_settings_schema_source_get_default(), ++ TRUE, ++ NULL); ++ schema = g_settings_schema_source_lookup(schema_source, ++ "org.gnome.evolution-data-server.calendar", ++ FALSE); ++ cbc->priv->settings = g_settings_new_full(schema, NULL, NULL); ++ g_settings_schema_source_unref(schema_source); ++ g_settings_schema_unref(schema); ++ } + cbc->priv->notifyid = 0; + cbc->priv->update_alarms_id = 0; + cbc->priv->alarm_enabled = FALSE; +diff --git a/src/calendar/libecal/e-reminder-watcher.c b/src/calendar/libecal/e-reminder-watcher.c +index b08a7f301..a49fe39c5 100644 +--- a/src/calendar/libecal/e-reminder-watcher.c ++++ b/src/calendar/libecal/e-reminder-watcher.c +@@ -2202,7 +2202,21 @@ e_reminder_watcher_init (EReminderWatcher *watcher) + + watcher->priv = G_TYPE_INSTANCE_GET_PRIVATE (watcher, E_TYPE_REMINDER_WATCHER, EReminderWatcherPrivate); + watcher->priv->cancellable = g_cancellable_new (); +- watcher->priv->settings = g_settings_new ("org.gnome.evolution-data-server.calendar"); ++ { ++ GSettingsSchemaSource *schema_source; ++ GSettingsSchema *schema; ++ schema_source = g_settings_schema_source_new_from_directory("@ESD_GSETTINGS_PATH@", ++ g_settings_schema_source_get_default(), ++ TRUE, ++ NULL); ++ schema = g_settings_schema_source_lookup(schema_source, ++ "org.gnome.evolution-data-server.calendar", ++ FALSE); ++ watcher->priv->settings = g_settings_new_full(schema, NULL, ++ NULL); ++ g_settings_schema_source_unref(schema_source); ++ g_settings_schema_unref(schema); ++ } + watcher->priv->scheduled = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, e_reminder_watcher_free_rd_slist); + watcher->priv->default_zone = icaltimezone_copy (zone); + watcher->priv->timers_enabled = TRUE; +diff --git a/src/camel/camel-cipher-context.c b/src/camel/camel-cipher-context.c +index dcdc3eed0..fd2e428c2 100644 +--- a/src/camel/camel-cipher-context.c ++++ b/src/camel/camel-cipher-context.c +@@ -1635,7 +1635,20 @@ camel_cipher_can_load_photos (void) + GSettings *settings; + gboolean load_photos; + +- settings = g_settings_new ("org.gnome.evolution-data-server"); ++ { ++ GSettingsSchemaSource *schema_source; ++ GSettingsSchema *schema; ++ schema_source = g_settings_schema_source_new_from_directory("@ESD_GSETTINGS_PATH@", ++ g_settings_schema_source_get_default(), ++ TRUE, ++ NULL); ++ schema = g_settings_schema_source_lookup(schema_source, ++ "org.gnome.evolution-data-server", ++ FALSE); ++ settings = g_settings_new_full(schema, NULL, NULL); ++ g_settings_schema_source_unref(schema_source); ++ g_settings_schema_unref(schema); ++ } + load_photos = g_settings_get_boolean (settings, "camel-cipher-load-photos"); + g_clear_object (&settings); + +diff --git a/src/camel/camel-gpg-context.c b/src/camel/camel-gpg-context.c +index 1b3362886..f0811b292 100644 +--- a/src/camel/camel-gpg-context.c ++++ b/src/camel/camel-gpg-context.c +@@ -573,7 +573,20 @@ gpg_ctx_get_executable_name (void) + GSettings *settings; + gchar *path; + +- settings = g_settings_new ("org.gnome.evolution-data-server"); ++ { ++ GSettingsSchemaSource *schema_source; ++ GSettingsSchema *schema; ++ schema_source = g_settings_schema_source_new_from_directory("@ESD_GSETTINGS_PATH@", ++ g_settings_schema_source_get_default(), ++ TRUE, ++ NULL); ++ schema = g_settings_schema_source_lookup(schema_source, ++ "org.gnome.evolution-data-server", ++ FALSE); ++ settings = g_settings_new_full(schema, NULL, NULL); ++ g_settings_schema_source_unref(schema_source); ++ g_settings_schema_unref(schema); ++ } + path = g_settings_get_string (settings, "camel-gpg-binary"); + g_clear_object (&settings); + +diff --git a/src/libedataserver/e-network-monitor.c b/src/libedataserver/e-network-monitor.c +index e0d8b87d6..3a4d5a359 100644 +--- a/src/libedataserver/e-network-monitor.c ++++ b/src/libedataserver/e-network-monitor.c +@@ -255,7 +255,20 @@ e_network_monitor_constructed (GObject *object) + /* Chain up to parent's method. */ + G_OBJECT_CLASS (e_network_monitor_parent_class)->constructed (object); + +- settings = g_settings_new ("org.gnome.evolution-data-server"); ++ { ++ GSettingsSchemaSource *schema_source; ++ GSettingsSchema *schema; ++ schema_source = g_settings_schema_source_new_from_directory("@ESD_GSETTINGS_PATH@", ++ g_settings_schema_source_get_default(), ++ TRUE, ++ NULL); ++ schema = g_settings_schema_source_lookup(schema_source, ++ "org.gnome.evolution-data-server", ++ FALSE); ++ settings = g_settings_new_full(schema, NULL, NULL); ++ g_settings_schema_source_unref(schema_source); ++ g_settings_schema_unref(schema); ++ } + g_settings_bind ( + settings, "network-monitor-gio-name", + object, "gio-name", +diff --git a/src/libedataserver/e-oauth2-service-google.c b/src/libedataserver/e-oauth2-service-google.c +index f0c6f2cbf..0053e3ce6 100644 +--- a/src/libedataserver/e-oauth2-service-google.c ++++ b/src/libedataserver/e-oauth2-service-google.c +@@ -69,7 +69,20 @@ eos_google_read_settings (EOAuth2Service *service, + if (!value) { + GSettings *settings; + +- settings = g_settings_new ("org.gnome.evolution-data-server"); ++ { ++ GSettingsSchemaSource *schema_source; ++ GSettingsSchema *schema; ++ schema_source = g_settings_schema_source_new_from_directory("@ESD_GSETTINGS_PATH@", ++ g_settings_schema_source_get_default(), ++ TRUE, ++ NULL); ++ schema = g_settings_schema_source_lookup(schema_source, ++ "org.gnome.evolution-data-server", ++ FALSE); ++ settings = g_settings_new_full(schema, NULL, NULL); ++ g_settings_schema_source_unref(schema_source); ++ g_settings_schema_unref(schema); ++ } + value = g_settings_get_string (settings, key_name); + g_object_unref (settings); + +diff --git a/src/libedataserver/e-oauth2-service-outlook.c b/src/libedataserver/e-oauth2-service-outlook.c +index 687c10d3b..684583c35 100644 +--- a/src/libedataserver/e-oauth2-service-outlook.c ++++ b/src/libedataserver/e-oauth2-service-outlook.c +@@ -70,7 +70,20 @@ eos_outlook_read_settings (EOAuth2Service *service, + if (!value) { + GSettings *settings; + +- settings = g_settings_new ("org.gnome.evolution-data-server"); ++ { ++ GSettingsSchemaSource *schema_source; ++ GSettingsSchema *schema; ++ schema_source = g_settings_schema_source_new_from_directory("@ESD_GSETTINGS_PATH@", ++ g_settings_schema_source_get_default(), ++ TRUE, ++ NULL); ++ schema = g_settings_schema_source_lookup(schema_source, ++ "org.gnome.evolution-data-server", ++ FALSE); ++ settings = g_settings_new_full(schema, NULL, NULL); ++ g_settings_schema_source_unref(schema_source); ++ g_settings_schema_unref(schema); ++ } + value = g_settings_get_string (settings, key_name); + g_object_unref (settings); + +diff --git a/src/libedataserver/e-oauth2-service.c b/src/libedataserver/e-oauth2-service.c +index 682673c16..436f52d5f 100644 +--- a/src/libedataserver/e-oauth2-service.c ++++ b/src/libedataserver/e-oauth2-service.c +@@ -95,7 +95,20 @@ eos_default_guess_can_process (EOAuth2Service *service, + name_len = strlen (name); + hostname_len = strlen (hostname); + +- settings = g_settings_new ("org.gnome.evolution-data-server"); ++ { ++ GSettingsSchemaSource *schema_source; ++ GSettingsSchema *schema; ++ schema_source = g_settings_schema_source_new_from_directory("@ESD_GSETTINGS_PATH@", ++ g_settings_schema_source_get_default(), ++ TRUE, ++ NULL); ++ schema = g_settings_schema_source_lookup(schema_source, ++ "org.gnome.evolution-data-server", ++ FALSE); ++ settings = g_settings_new_full(schema, NULL, NULL); ++ g_settings_schema_source_unref(schema_source); ++ g_settings_schema_unref(schema); ++ } + values = g_settings_get_strv (settings, "oauth2-services-hint"); + g_object_unref (settings); + +diff --git a/src/libedataserver/e-proxy.c b/src/libedataserver/e-proxy.c +index 883379a60..989353494 100644 +--- a/src/libedataserver/e-proxy.c ++++ b/src/libedataserver/e-proxy.c +@@ -969,8 +969,37 @@ e_proxy_init (EProxy *proxy) + + proxy->priv->type = PROXY_TYPE_SYSTEM; + +- proxy->priv->evolution_proxy_settings = g_settings_new ("org.gnome.evolution.shell.network-config"); +- proxy->priv->proxy_settings = g_settings_new ("org.gnome.system.proxy"); ++ { ++ GSettingsSchemaSource *schema_source; ++ GSettingsSchema *schema; ++ schema_source = g_settings_schema_source_new_from_directory("@ESD_GSETTINGS_PATH@", ++ g_settings_schema_source_get_default(), ++ TRUE, ++ NULL); ++ schema = g_settings_schema_source_lookup(schema_source, ++ "org.gnome.evolution.shell.network-config", ++ FALSE); ++ proxy->priv->evolution_proxy_settings = g_settings_new_full(schema, ++ NULL, ++ NULL); ++ g_settings_schema_source_unref(schema_source); ++ g_settings_schema_unref(schema); ++ } ++ { ++ GSettingsSchemaSource *schema_source; ++ GSettingsSchema *schema; ++ schema_source = g_settings_schema_source_new_from_directory("@GDS_GSETTINGS_PATH@", ++ g_settings_schema_source_get_default(), ++ TRUE, ++ NULL); ++ schema = g_settings_schema_source_lookup(schema_source, ++ "org.gnome.system.proxy", ++ FALSE); ++ proxy->priv->proxy_settings = g_settings_new_full(schema, ++ NULL, NULL); ++ g_settings_schema_source_unref(schema_source); ++ g_settings_schema_unref(schema); ++ } + proxy->priv->proxy_http_settings = g_settings_get_child (proxy->priv->proxy_settings, "http"); + proxy->priv->proxy_https_settings = g_settings_get_child (proxy->priv->proxy_settings, "https"); + proxy->priv->proxy_socks_settings = g_settings_get_child (proxy->priv->proxy_settings, "socks"); +diff --git a/src/libedataserver/e-source-registry.c b/src/libedataserver/e-source-registry.c +index a5a30a3e1..5fbdf8190 100644 +--- a/src/libedataserver/e-source-registry.c ++++ b/src/libedataserver/e-source-registry.c +@@ -1749,7 +1749,21 @@ e_source_registry_init (ESourceRegistry *registry) + + g_mutex_init (®istry->priv->sources_lock); + +- registry->priv->settings = g_settings_new (GSETTINGS_SCHEMA); ++ { ++ GSettingsSchemaSource *schema_source; ++ GSettingsSchema *schema; ++ schema_source = g_settings_schema_source_new_from_directory("@ESD_GSETTINGS_PATH@", ++ g_settings_schema_source_get_default(), ++ TRUE, ++ NULL); ++ schema = g_settings_schema_source_lookup(schema_source, ++ GSETTINGS_SCHEMA, ++ FALSE); ++ registry->priv->settings = g_settings_new_full(schema, NULL, ++ NULL); ++ g_settings_schema_source_unref(schema_source); ++ g_settings_schema_unref(schema); ++ } + + g_signal_connect ( + registry->priv->settings, "changed", +diff --git a/src/libedataserverui/e-reminders-widget.c b/src/libedataserverui/e-reminders-widget.c +index f89cd4a5c..06cca9b5f 100644 +--- a/src/libedataserverui/e-reminders-widget.c ++++ b/src/libedataserverui/e-reminders-widget.c +@@ -1650,7 +1650,21 @@ static void + e_reminders_widget_init (ERemindersWidget *reminders) + { + reminders->priv = e_reminders_widget_get_instance_private (reminders); +- reminders->priv->settings = g_settings_new ("org.gnome.evolution-data-server.calendar"); ++ { ++ GSettingsSchemaSource *schema_source; ++ GSettingsSchema *schema; ++ schema_source = g_settings_schema_source_new_from_directory("@ESD_GSETTINGS_PATH@", ++ g_settings_schema_source_get_default(), ++ TRUE, ++ NULL); ++ schema = g_settings_schema_source_lookup(schema_source, ++ "org.gnome.evolution-data-server.calendar", ++ FALSE); ++ reminders->priv->settings = g_settings_new_full(schema, NULL, ++ NULL); ++ g_settings_schema_source_unref(schema_source); ++ g_settings_schema_unref(schema); ++ } + reminders->priv->cancellable = g_cancellable_new (); + reminders->priv->is_empty = TRUE; + reminders->priv->is_mapped = FALSE; +diff --git a/src/services/evolution-source-registry/evolution-source-registry-autoconfig.c b/src/services/evolution-source-registry/evolution-source-registry-autoconfig.c +index 6f03053d6..dffc186c7 100644 +--- a/src/services/evolution-source-registry/evolution-source-registry-autoconfig.c ++++ b/src/services/evolution-source-registry/evolution-source-registry-autoconfig.c +@@ -706,7 +706,20 @@ evolution_source_registry_merge_autoconfig_sources (ESourceRegistryServer *serve + gchar *autoconfig_directory; + gint ii; + +- settings = g_settings_new ("org.gnome.evolution-data-server"); ++ { ++ GSettingsSchemaSource *schema_source; ++ GSettingsSchema *schema; ++ schema_source = g_settings_schema_source_new_from_directory("@ESD_GSETTINGS_PATH@", ++ g_settings_schema_source_get_default(), ++ TRUE, ++ NULL); ++ schema = g_settings_schema_source_lookup(schema_source, ++ "org.gnome.evolution-data-server", ++ FALSE); ++ settings = g_settings_new_full(schema, NULL, NULL); ++ g_settings_schema_source_unref(schema_source); ++ g_settings_schema_unref(schema); ++ } + + autoconfig_sources = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, e_autoconfig_free_merge_source_data); + +diff --git a/src/services/evolution-source-registry/evolution-source-registry-migrate-proxies.c b/src/services/evolution-source-registry/evolution-source-registry-migrate-proxies.c +index d531cb9e2..c5b1c761c 100644 +--- a/src/services/evolution-source-registry/evolution-source-registry-migrate-proxies.c ++++ b/src/services/evolution-source-registry/evolution-source-registry-migrate-proxies.c +@@ -61,7 +61,20 @@ evolution_source_registry_migrate_proxies (ESourceRegistryServer *server) + extension_name = E_SOURCE_EXTENSION_PROXY; + extension = e_source_get_extension (source, extension_name); + +- settings = g_settings_new (NETWORK_CONFIG_SCHEMA_ID); ++ { ++ GSettingsSchemaSource *schema_source; ++ GSettingsSchema *schema; ++ schema_source = g_settings_schema_source_new_from_directory("@ESD_GSETTINGS_PATH@", ++ g_settings_schema_source_get_default(), ++ TRUE, ++ NULL); ++ schema = g_settings_schema_source_lookup(schema_source, ++ NETWORK_CONFIG_SCHEMA_ID, ++ FALSE); ++ settings = g_settings_new_full(schema, NULL, NULL); ++ g_settings_schema_source_unref(schema_source); ++ g_settings_schema_unref(schema); ++ } + + switch (g_settings_get_int (settings, "proxy-type")) { + case 1: +diff --git a/src/services/evolution-source-registry/evolution-source-registry.c b/src/services/evolution-source-registry/evolution-source-registry.c +index 1c0a11382..3e144845e 100644 +--- a/src/services/evolution-source-registry/evolution-source-registry.c ++++ b/src/services/evolution-source-registry/evolution-source-registry.c +@@ -181,7 +181,20 @@ main (gint argc, + + reload: + +- settings = g_settings_new ("org.gnome.evolution-data-server"); ++ { ++ GSettingsSchemaSource *schema_source; ++ GSettingsSchema *schema; ++ schema_source = g_settings_schema_source_new_from_directory("@ESD_GSETTINGS_PATH@", ++ g_settings_schema_source_get_default(), ++ TRUE, ++ NULL); ++ schema = g_settings_schema_source_lookup(schema_source, ++ "org.gnome.evolution-data-server", ++ FALSE); ++ settings = g_settings_new_full(schema, NULL, NULL); ++ g_settings_schema_source_unref(schema_source); ++ g_settings_schema_unref(schema); ++ } + + if (!opt_disable_migration && !g_settings_get_boolean (settings, "migrated")) { + g_settings_set_boolean (settings, "migrated", TRUE); diff --git a/pkgs/desktops/gnome/core/gdm/default.nix b/pkgs/desktops/gnome/core/gdm/default.nix new file mode 100644 index 0000000000000..f304497734953 --- /dev/null +++ b/pkgs/desktops/gnome/core/gdm/default.nix @@ -0,0 +1,180 @@ +{ lib, stdenv +, fetchurl +, fetchpatch +, substituteAll +, meson +, ninja +, python3 +, rsync +, pkg-config +, glib +, itstool +, libxml2 +, xorg +, accountsservice +, libX11 +, gnome +, systemd +, dconf +, gtk3 +, libcanberra-gtk3 +, pam +, libselinux +, keyutils +, audit +, gobject-introspection +, plymouth +, librsvg +, coreutils +, xwayland +, dbus +, nixos-icons +}: + +let + + override = substituteAll { + src = ./org.gnome.login-screen.gschema.override; + icon = "${nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake-white.svg"; + }; + +in + +stdenv.mkDerivation rec { + pname = "gdm"; + version = "40.0"; + + outputs = [ "out" "dev" ]; + + src = fetchurl { + url = "mirror://gnome/sources/gdm/${lib.versions.major version}/${pname}-${version}.tar.xz"; + sha256 = "XtdLc506Iy/7HkoTK8+WW9/pVdmVtSh3NYh3WwLylQ4="; + }; + + mesonFlags = [ + "-Dgdm-xsession=true" + # TODO: Setup a default-path? https://gitlab.gnome.org/GNOME/gdm/-/blob/6fc40ac6aa37c8ad87c32f0b1a5d813d34bf7770/meson_options.txt#L6 + "-Dinitial-vt=${passthru.initialVT}" + "-Dudev-dir=${placeholder "out"}/lib/udev/rules.d" + "-Dsystemdsystemunitdir=${placeholder "out"}/lib/systemd/system" + "-Dsystemduserunitdir=${placeholder "out"}/lib/systemd/user" + "--sysconfdir=/etc" + "--localstatedir=/var" + ]; + + nativeBuildInputs = [ + dconf + glib # for glib-compile-schemas + itstool + meson + ninja + pkg-config + python3 + rsync + ]; + + buildInputs = [ + accountsservice + audit + glib + gobject-introspection + gtk3 + keyutils + libX11 + libcanberra-gtk3 + libselinux + pam + plymouth + systemd + xorg.libXdmcp + ]; + + patches = [ + # GDM fails to find g-s with the following error in the journal. + # gdm-x-session[976]: dbus-run-session: failed to exec 'gnome-session': No such file or directory + # https://gitlab.gnome.org/GNOME/gdm/-/merge_requests/92 + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/gdm/-/commit/ccecd9c975d04da80db4cd547b67a1a94fa83292.patch"; + sha256 = "5hKS9wjjhuSAYwXct5vS0dPbmPRIINJoLC0Zm1naz6Q="; + revert = true; + }) + + # Change hardcoded paths to nix store paths. + (substituteAll { + src = ./fix-paths.patch; + inherit coreutils plymouth xwayland dbus; + }) + + # The following patches implement certain environment variables in GDM which are set by + # the gdm configuration module (nixos/modules/services/x11/display-managers/gdm.nix). + + ./gdm-x-session_extra_args.patch + + # Allow specifying a wrapper for running the session command. + ./gdm-x-session_session-wrapper.patch + + # Forwards certain environment variables to the gdm-x-session child process + # to ensure that the above two patches actually work. + ./gdm-session-worker_forward-vars.patch + + # Set up the environment properly when launching sessions + # https://github.com/NixOS/nixpkgs/issues/48255 + ./reset-environment.patch + ]; + + postPatch = '' + patchShebangs build-aux/meson_post_install.py + + # Upstream checks some common paths to find an `X` binary. We already know it. + echo #!/bin/sh > build-aux/find-x-server.sh + echo "echo ${lib.getBin xorg.xorgserver}/bin/X" >> build-aux/find-x-server.sh + patchShebangs build-aux/find-x-server.sh + ''; + + preInstall = '' + install -D ${override} ${DESTDIR}/$out/share/glib-2.0/schemas/org.gnome.login-screen.gschema.override + ''; + + postInstall = '' + # Move stuff from DESTDIR to proper location. + # We use rsync to merge the directories. + rsync --archive "${DESTDIR}/etc" "$out" + rm --recursive "${DESTDIR}/etc" + for o in $outputs; do + rsync --archive "${DESTDIR}/''${!o}" "$(dirname "''${!o}")" + rm --recursive "${DESTDIR}/''${!o}" + done + # Ensure the DESTDIR is removed. + rmdir "${DESTDIR}/nix/store" "${DESTDIR}/nix" "${DESTDIR}" + + # We are setting DESTDIR so the post-install script does not compile the schemas. + glib-compile-schemas "$out/share/glib-2.0/schemas" + ''; + + # HACK: We want to install configuration files to $out/etc + # but GDM should read them from /etc on a NixOS system. + # With autotools, it was possible to override Make variables + # at install time but Meson does not support this + # so we need to convince it to install all files to a temporary + # location using DESTDIR and then move it to proper one in postInstall. + DESTDIR = "${placeholder "out"}/dest"; + + passthru = { + updateScript = gnome.updateScript { + packageName = "gdm"; + attrPath = "gnome.gdm"; + }; + + # Used in GDM NixOS module + # Don't remove. + initialVT = "7"; + }; + + meta = with lib; { + description = "A program that manages graphical display servers and handles graphical user logins"; + homepage = "https://wiki.gnome.org/Projects/GDM"; + license = licenses.gpl2Plus; + maintainers = teams.gnome.members; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome/core/gdm/fix-paths.patch b/pkgs/desktops/gnome/core/gdm/fix-paths.patch new file mode 100644 index 0000000000000..d649556fe9e62 --- /dev/null +++ b/pkgs/desktops/gnome/core/gdm/fix-paths.patch @@ -0,0 +1,82 @@ +--- a/daemon/gdm-local-display-factory.c ++++ b/daemon/gdm-local-display-factory.c +@@ -201,7 +201,7 @@ + #ifdef ENABLE_WAYLAND_SUPPORT + gboolean wayland_enabled = FALSE; + if (gdm_settings_direct_get_boolean (GDM_KEY_WAYLAND_ENABLE, &wayland_enabled)) { +- if (wayland_enabled && g_file_test ("/usr/bin/Xwayland", G_FILE_TEST_IS_EXECUTABLE) ) ++ if (wayland_enabled && g_file_test ("@xwayland@/bin/Xwayland", G_FILE_TEST_IS_EXECUTABLE) ) + return TRUE; + } + #endif +--- a/daemon/gdm-manager.c ++++ b/daemon/gdm-manager.c +@@ -145,7 +145,7 @@ + GError *error; + + error = NULL; +- res = g_spawn_command_line_sync ("plymouth --ping", ++ res = g_spawn_command_line_sync ("@plymouth@/bin/plymouth --ping", + NULL, NULL, &status, &error); + if (! res) { + g_debug ("Could not ping plymouth: %s", error->message); +@@ -163,7 +163,7 @@ + GError *error; + + error = NULL; +- res = g_spawn_command_line_sync ("plymouth deactivate", ++ res = g_spawn_command_line_sync ("@plymouth@/bin/plymouth deactivate", + NULL, NULL, NULL, &error); + if (! res) { + g_warning ("Could not deactivate plymouth: %s", error->message); +@@ -178,7 +178,7 @@ + GError *error; + + error = NULL; +- res = g_spawn_command_line_async ("plymouth quit --retain-splash", &error); ++ res = g_spawn_command_line_async ("@plymouth@/bin/plymouth quit --retain-splash", &error); + if (! res) { + g_warning ("Could not quit plymouth: %s", error->message); + g_error_free (error); +@@ -194,7 +194,7 @@ + GError *error; + + error = NULL; +- res = g_spawn_command_line_async ("plymouth quit", &error); ++ res = g_spawn_command_line_async ("@plymouth@/bin/plymouth quit", &error); + if (! res) { + g_warning ("Could not quit plymouth: %s", error->message); + g_error_free (error); +--- a/data/gdm.service.in ++++ b/data/gdm.service.in +@@ -26,7 +26,7 @@ Restart=always + IgnoreSIGPIPE=no + BusName=org.gnome.DisplayManager + EnvironmentFile=-${LANG_CONFIG_FILE} +-ExecReload=/bin/kill -SIGHUP $MAINPID ++ExecReload=@coreutils@/bin/kill -SIGHUP $MAINPID + KeyringMode=shared + + [Install] +--- a/daemon/gdm-session.c ++++ b/daemon/gdm-session.c +@@ -2916,16 +2916,16 @@ gdm_session_start_session (GdmSession *self, + */ + if (run_launcher) { + if (is_x11) { +- program = g_strdup_printf (LIBEXECDIR "/gdm-x-session %s\"dbus-run-session -- %s\"", ++ program = g_strdup_printf (LIBEXECDIR "/gdm-x-session %s\"@dbus@/bin/dbus-run-session --dbus-daemon=@dbus@/bin/dbus-daemon -- %s\"", + register_session ? "--register-session " : "", + self->selected_program); + } else { +- program = g_strdup_printf (LIBEXECDIR "/gdm-wayland-session %s\"dbus-run-session -- %s\"", ++ program = g_strdup_printf (LIBEXECDIR "/gdm-wayland-session %s\"@dbus@/bin/dbus-run-session --dbus-daemon=@dbus@/bin/dbus-daemon -- %s\"", + register_session ? "--register-session " : "", + self->selected_program); + } + } else { +- program = g_strdup_printf ("dbus-run-session -- %s", ++ program = g_strdup_printf ("@dbus@/bin/dbus-run-session --dbus-daemon=@dbus@/bin/dbus-daemon -- %s", + self->selected_program); + } + } diff --git a/pkgs/desktops/gnome/core/gdm/gdm-session-worker_forward-vars.patch b/pkgs/desktops/gnome/core/gdm/gdm-session-worker_forward-vars.patch new file mode 100644 index 0000000000000..401b6aea0c28e --- /dev/null +++ b/pkgs/desktops/gnome/core/gdm/gdm-session-worker_forward-vars.patch @@ -0,0 +1,31 @@ +diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c +index 9ef4c5b..94da834 100644 +--- a/daemon/gdm-session-worker.c ++++ b/daemon/gdm-session-worker.c +@@ -1515,6 +1515,16 @@ gdm_session_worker_load_env_d (GdmSessionWorker *worker) + g_object_unref (dir); + } + ++static void ++gdm_session_worker_forward_var (GdmSessionWorker *worker, char const *var) ++{ ++ char const *value = g_getenv(var); ++ if (value != NULL) { ++ g_debug ("forwarding %s= %s", var, value); ++ gdm_session_worker_set_environment_variable(worker, var, value); ++ } ++} ++ + static gboolean + gdm_session_worker_accredit_user (GdmSessionWorker *worker, + GError **error) +@@ -1559,6 +1569,9 @@ gdm_session_worker_accredit_user (GdmSessionWorker *worker, + goto out; + } + ++ gdm_session_worker_forward_var(worker, "GDM_X_SERVER_EXTRA_ARGS"); ++ gdm_session_worker_forward_var(worker, "GDM_X_SESSION_WRAPPER"); ++ + gdm_session_worker_update_environment_from_passwd_info (worker, + uid, + gid, diff --git a/pkgs/desktops/gnome/core/gdm/gdm-x-session_extra_args.patch b/pkgs/desktops/gnome/core/gdm/gdm-x-session_extra_args.patch new file mode 100644 index 0000000000000..66071aa4af805 --- /dev/null +++ b/pkgs/desktops/gnome/core/gdm/gdm-x-session_extra_args.patch @@ -0,0 +1,38 @@ +diff --git a/daemon/gdm-x-session.c.orig b/daemon/gdm-x-session.c +index d835b34..1f4b7f1 100644 +--- a/daemon/gdm-x-session.c.orig ++++ b/daemon/gdm-x-session.c +@@ -211,6 +211,7 @@ spawn_x_server (State *state, + char *vt_string = NULL; + char *display_number; + gsize display_number_size; ++ gchar **xserver_extra_args = NULL; + + auth_file = prepare_auth_file (); + +@@ -285,6 +286,17 @@ spawn_x_server (State *state, + if (state->debug_enabled) { + g_ptr_array_add (arguments, "-core"); + } ++ ++ if (g_getenv ("GDM_X_SERVER_EXTRA_ARGS") != NULL) { ++ g_debug ("using GDM_X_SERVER_EXTRA_ARGS: %s", g_getenv("GDM_X_SERVER_EXTRA_ARGS")); ++ xserver_extra_args = g_strsplit(g_getenv("GDM_X_SERVER_EXTRA_ARGS"), " ", -1); ++ for (gchar **extra_arg = xserver_extra_args; *extra_arg; extra_arg++) { ++ if (strlen(*extra_arg) < 1) continue; ++ g_debug ("adding: %s", *extra_arg); ++ g_ptr_array_add (arguments, *extra_arg); ++ } ++ } ++ + g_ptr_array_add (arguments, NULL); + + subprocess = g_subprocess_launcher_spawnv (launcher, +@@ -332,6 +344,7 @@ spawn_x_server (State *state, + + is_running = TRUE; + out: ++ g_strfreev(xserver_extra_args); + g_clear_pointer (&auth_file, g_free); + g_clear_object (&data_stream); + g_clear_object (&subprocess); diff --git a/pkgs/desktops/gnome/core/gdm/gdm-x-session_session-wrapper.patch b/pkgs/desktops/gnome/core/gdm/gdm-x-session_session-wrapper.patch new file mode 100644 index 0000000000000..58481f0730fae --- /dev/null +++ b/pkgs/desktops/gnome/core/gdm/gdm-x-session_session-wrapper.patch @@ -0,0 +1,40 @@ +diff --git a/daemon/gdm-x-session.c b/daemon/gdm-x-session.c +index 88fe96f..b1b140a 100644 +--- a/daemon/gdm-x-session.c ++++ b/daemon/gdm-x-session.c +@@ -664,18 +664,34 @@ spawn_session (State *state, + state->session_command, + NULL); + } else { ++ char const *session_wrapper; ++ char *eff_session_command; + int ret; + char **argv; + +- ret = g_shell_parse_argv (state->session_command, ++ session_wrapper = g_getenv("GDM_X_SESSION_WRAPPER"); ++ if (session_wrapper != NULL) { ++ char *quoted_wrapper = g_shell_quote(session_wrapper); ++ eff_session_command = g_strjoin(" ", quoted_wrapper, state->session_command, NULL); ++ g_free(quoted_wrapper); ++ } else { ++ eff_session_command = state->session_command; ++ } ++ ++ ret = g_shell_parse_argv (eff_session_command, + NULL, + &argv, + &error); + ++ if (session_wrapper != NULL) { ++ g_free(eff_session_command); ++ } ++ + if (!ret) { + g_debug ("could not parse session arguments: %s", error->message); + goto out; + } ++ + subprocess = g_subprocess_launcher_spawnv (launcher, + (const char * const *) argv, + &error); diff --git a/pkgs/desktops/gnome/core/gdm/org.gnome.login-screen.gschema.override b/pkgs/desktops/gnome/core/gdm/org.gnome.login-screen.gschema.override new file mode 100644 index 0000000000000..8c17f494b0f2a --- /dev/null +++ b/pkgs/desktops/gnome/core/gdm/org.gnome.login-screen.gschema.override @@ -0,0 +1,2 @@ +[org.gnome.login-screen] +logo='@icon@' diff --git a/pkgs/desktops/gnome/core/gdm/reset-environment.patch b/pkgs/desktops/gnome/core/gdm/reset-environment.patch new file mode 100644 index 0000000000000..61defd9c4bc20 --- /dev/null +++ b/pkgs/desktops/gnome/core/gdm/reset-environment.patch @@ -0,0 +1,20 @@ +--- a/daemon/gdm-wayland-session.c ++++ b/daemon/gdm-wayland-session.c +@@ -285,6 +285,7 @@ spawn_session (State *state, + "WAYLAND_DISPLAY", + "WAYLAND_SOCKET", + "GNOME_SHELL_SESSION_MODE", ++ "__NIXOS_SET_ENVIRONMENT_DONE", + NULL }; + + g_debug ("Running wayland session"); +--- a/daemon/gdm-x-session.c ++++ b/daemon/gdm-x-session.c +@@ -610,6 +610,7 @@ spawn_session (State *state, + "WAYLAND_DISPLAY", + "WAYLAND_SOCKET", + "GNOME_SHELL_SESSION_MODE", ++ "__NIXOS_SET_ENVIRONMENT_DONE", + NULL }; + + g_debug ("Running X session"); diff --git a/pkgs/desktops/gnome/core/gnome-backgrounds/default.nix b/pkgs/desktops/gnome/core/gnome-backgrounds/default.nix new file mode 100644 index 0000000000000..370cd14e46775 --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-backgrounds/default.nix @@ -0,0 +1,22 @@ +{ lib, stdenv, fetchurl, meson, ninja, pkg-config, gnome, gettext }: + +stdenv.mkDerivation rec { + pname = "gnome-backgrounds"; + version = "40.1"; + + src = fetchurl { + url = "mirror://gnome/sources/gnome-backgrounds/${lib.versions.major version}/${pname}-${version}.tar.xz"; + sha256 = "YN+KDaMBzkJbcEPUKuMuxAEf8I8Y4Pxi8pQBMF2jpw4="; + }; + + passthru = { + updateScript = gnome.updateScript { packageName = "gnome-backgrounds"; attrPath = "gnome.gnome-backgrounds"; }; + }; + + nativeBuildInputs = [ meson ninja pkg-config gettext ]; + + meta = with lib; { + platforms = platforms.unix; + maintainers = teams.gnome.members; + }; +} diff --git a/pkgs/desktops/gnome/core/gnome-bluetooth/default.nix b/pkgs/desktops/gnome/core/gnome-bluetooth/default.nix new file mode 100644 index 0000000000000..07b77c04994d8 --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-bluetooth/default.nix @@ -0,0 +1,86 @@ +{ lib +, stdenv +, fetchurl +, gnome +, meson +, ninja +, pkg-config +, gtk3 +, gettext +, glib +, udev +, itstool +, libxml2 +, wrapGAppsHook +, libnotify +, libcanberra-gtk3 +, gobject-introspection +, gtk-doc +, docbook-xsl-nons +, docbook_xml_dtd_43 +, python3 +, gsettings-desktop-schemas +}: + +stdenv.mkDerivation rec { + pname = "gnome-bluetooth"; + version = "3.34.5"; + + # TODO: split out "lib" + outputs = [ "out" "dev" "devdoc" "man" ]; + + src = fetchurl { + url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; + sha256 = "1a9ynlwwkb3wpg293ym517vmrkk63y809mmcv9a21k5yr199x53c"; + }; + + nativeBuildInputs = [ + meson + ninja + gettext + itstool + pkg-config + libxml2 + wrapGAppsHook + gobject-introspection + gtk-doc + docbook-xsl-nons + docbook_xml_dtd_43 + python3 + ]; + + buildInputs = [ + glib + gtk3 + udev + libnotify + libcanberra-gtk3 + gnome.adwaita-icon-theme + gsettings-desktop-schemas + ]; + + mesonFlags = [ + "-Dicon_update=false" + "-Dgtk_doc=true" + ]; + + postPatch = '' + chmod +x meson_post_install.py # patchShebangs requires executable file + patchShebangs meson_post_install.py + ''; + + passthru = { + updateScript = gnome.updateScript { + packageName = pname; + attrPath = "gnome.${pname}"; + }; + }; + + meta = with lib; { + homepage = "https://help.gnome.org/users/gnome-bluetooth/stable/index.html.en"; + description = "Application that let you manage Bluetooth in the GNOME destkop"; + maintainers = teams.gnome.members; + license = licenses.gpl2Plus; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome/core/gnome-calculator/default.nix b/pkgs/desktops/gnome/core/gnome-calculator/default.nix new file mode 100644 index 0000000000000..7e19e9523ce84 --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-calculator/default.nix @@ -0,0 +1,89 @@ +{ stdenv +, lib +, meson +, ninja +, vala +, gettext +, itstool +, fetchurl +, pkg-config +, libxml2 +, gtk3 +, glib +, gtksourceview4 +, wrapGAppsHook +, gobject-introspection +, python3 +, gnome +, mpfr +, gmp +, libsoup +, libmpc +, libhandy +, gsettings-desktop-schemas +, libgee +}: + +stdenv.mkDerivation rec { + pname = "gnome-calculator"; + version = "40.1"; + + src = fetchurl { + url = "mirror://gnome/sources/gnome-calculator/${lib.versions.major version}/${pname}-${version}.tar.xz"; + sha256 = "1xkazxbkpn1z5pfphhps7fc5q4yc8lp7f6b222n8bx5iyxhwbrkz"; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + vala + gettext + itstool + wrapGAppsHook + python3 + gobject-introspection # for finding vapi files + ]; + + buildInputs = [ + gtk3 + glib + libxml2 + gtksourceview4 + mpfr + gmp + gnome.adwaita-icon-theme + libgee + gsettings-desktop-schemas + libsoup + libmpc + libhandy + ]; + + doCheck = true; + + postPatch = '' + chmod +x meson_post_install.py # patchShebangs requires executable file + patchShebangs meson_post_install.py + ''; + + preCheck = '' + # Currency conversion test tries to store currency data in $HOME/.cache. + export HOME=$TMPDIR + ''; + + passthru = { + updateScript = gnome.updateScript { + packageName = "gnome-calculator"; + attrPath = "gnome.gnome-calculator"; + }; + }; + + meta = with lib; { + homepage = "https://wiki.gnome.org/Apps/Calculator"; + description = "Application that solves mathematical equations and is suitable as a default application in a Desktop environment"; + maintainers = teams.gnome.members; + license = licenses.gpl3Plus; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome/core/gnome-color-manager/default.nix b/pkgs/desktops/gnome/core/gnome-color-manager/default.nix new file mode 100644 index 0000000000000..dae367f1d5baa --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-color-manager/default.nix @@ -0,0 +1,66 @@ +{ lib, stdenv +, fetchurl +, meson +, ninja +, pkg-config +, gettext +, itstool +, desktop-file-utils +, gnome +, glib +, gtk3 +, libexif +, libtiff +, colord +, colord-gtk +, libcanberra-gtk3 +, lcms2 +, vte +, exiv2 +}: + +stdenv.mkDerivation rec { + pname = "gnome-color-manager"; + version = "3.32.0"; + + src = fetchurl { + url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; + sha256 = "1vpxa2zjz3lkq9ldjg0fl65db9s6b4kcs8nyaqfz3jygma7ifg3w"; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + gettext + itstool + desktop-file-utils + ]; + + buildInputs = [ + glib + gtk3 + libexif + libtiff + colord + colord-gtk + libcanberra-gtk3 + lcms2 + vte + exiv2 + ]; + + passthru = { + updateScript = gnome.updateScript { + packageName = pname; + attrPath = "gnome.${pname}"; + }; + }; + + meta = with lib; { + description = "A set of graphical utilities for color management to be used in the GNOME desktop"; + license = licenses.gpl2Plus; + maintainers = teams.gnome.members; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome/core/gnome-common/default.nix b/pkgs/desktops/gnome/core/gnome-common/default.nix new file mode 100644 index 0000000000000..cb50396a40401 --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-common/default.nix @@ -0,0 +1,27 @@ +{ lib, stdenv, fetchurl, which, gnome, autoconf, automake }: + +stdenv.mkDerivation rec { + pname = "gnome-common"; + version = "3.18.0"; + + src = fetchurl { + url = "mirror://gnome/sources/gnome-common/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; + sha256 = "22569e370ae755e04527b76328befc4c73b62bfd4a572499fde116b8318af8cf"; + }; + + passthru = { + updateScript = gnome.updateScript { packageName = "gnome-common"; attrPath = "gnome.gnome-common"; }; + }; + + patches = [(fetchurl { + name = "gnome-common-patch"; + url = "https://bug697543.bugzilla-attachments.gnome.org/attachment.cgi?id=240935"; + sha256 = "17abp7czfzirjm7qsn2czd03hdv9kbyhk3lkjxg2xsf5fky7z7jl"; + })]; + + propagatedBuildInputs = [ which autoconf automake ]; # autogen.sh which is using gnome-common tends to require which + + meta = with lib; { + maintainers = teams.gnome.members; + }; +} diff --git a/pkgs/desktops/gnome/core/gnome-contacts/default.nix b/pkgs/desktops/gnome/core/gnome-contacts/default.nix new file mode 100644 index 0000000000000..62a43d20d5806 --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-contacts/default.nix @@ -0,0 +1,95 @@ +{ lib, stdenv +, gettext +, fetchurl +, evolution-data-server +, pkg-config +, libxslt +, docbook_xsl +, docbook_xml_dtd_42 +, python3 +, gtk3 +, glib +, cheese +, libchamplain +, clutter-gtk +, geocode-glib +, gnome-desktop +, gnome-online-accounts +, wrapGAppsHook +, folks +, libgdata +, libxml2 +, gnome +, vala +, meson +, ninja +, libhandy +, gsettings-desktop-schemas +}: + +stdenv.mkDerivation rec { + pname = "gnome-contacts"; + version = "40.0"; + + src = fetchurl { + url = "mirror://gnome/sources/gnome-contacts/${lib.versions.major version}/${pname}-${version}.tar.xz"; + sha256 = "0w2g5xhw65adzvwzakrj5kaim4sw1w7s8qqwm3nm6inq50znzpn9"; + }; + + propagatedUserEnvPkgs = [ + evolution-data-server + ]; + + nativeBuildInputs = [ + meson + ninja + pkg-config + vala + gettext + libxslt + docbook_xsl + docbook_xml_dtd_42 + python3 + wrapGAppsHook + ]; + + buildInputs = [ + gtk3 + glib + evolution-data-server + gsettings-desktop-schemas + folks + libgdata # required by some dependency transitively + gnome-desktop + libhandy + libxml2 + gnome-online-accounts + cheese + gnome.adwaita-icon-theme + libchamplain + clutter-gtk + geocode-glib + ]; + + postPatch = '' + chmod +x build-aux/meson_post_install.py + patchShebangs build-aux/meson_post_install.py + ''; + + doCheck = true; + + passthru = { + updateScript = gnome.updateScript { + packageName = "gnome-contacts"; + attrPath = "gnome.gnome-contacts"; + }; + }; + + meta = with lib; { + homepage = "https://wiki.gnome.org/Apps/Contacts"; + description = "GNOME’s integrated address book"; + maintainers = teams.gnome.members; + license = licenses.gpl2Plus; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome/core/gnome-control-center/default.nix b/pkgs/desktops/gnome/core/gnome-control-center/default.nix new file mode 100644 index 0000000000000..6170f53c716ba --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-control-center/default.nix @@ -0,0 +1,190 @@ +{ fetchurl +, fetchpatch +, lib +, stdenv +, substituteAll +, accountsservice +, adwaita-icon-theme +, cheese +, clutter +, clutter-gtk +, colord +, colord-gtk +, cups +, docbook-xsl-nons +, fontconfig +, gdk-pixbuf +, gettext +, glib +, glib-networking +, glibc +, gnome-bluetooth +, gnome-color-manager +, gnome-desktop +, gnome-online-accounts +, gnome-settings-daemon +, gnome +, grilo +, grilo-plugins +, gsettings-desktop-schemas +, gsound +, gtk3 +, ibus +, libcanberra-gtk3 +, libgnomekbd +, libgtop +, libgudev +, libhandy +, libkrb5 +, libpulseaudio +, libpwquality +, librsvg +, libsecret +, libsoup +, libwacom +, libxml2 +, libxslt +, meson +, modemmanager +, mutter +, networkmanager +, networkmanagerapplet +, libnma +, ninja +, pkg-config +, polkit +, python3 +, samba +, shared-mime-info +, sound-theme-freedesktop +, tracker +, tracker-miners +, tzdata +, udisks2 +, upower +, epoxy +, gnome-user-share +, gnome-remote-desktop +, wrapGAppsHook +}: + +stdenv.mkDerivation rec { + pname = "gnome-control-center"; + version = "40.0"; + + src = fetchurl { + url = "mirror://gnome/sources/${pname}/${lib.versions.major version}/${pname}-${version}.tar.xz"; + sha256 = "sha256-zMmlc2UXOFEJrlpZkGwlgkTdh5t1A61ZhM9BZVyzAvE="; + }; + + patches = [ + (substituteAll { + src = ./paths.patch; + gcm = gnome-color-manager; + gnome_desktop = gnome-desktop; + inherit glibc libgnomekbd tzdata; + inherit cups networkmanagerapplet; + }) + + # Fix startup assertion in power panel. + # https://gitlab.gnome.org/GNOME/gnome-control-center/merge_requests/974 + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/gnome-control-center/commit/9acaa10567c94048657c69538e5d7813f82c4224.patch"; + sha256 = "59GeTPcG2UiVTL4VTS/TP0p0QkAQpm3VgvuAiw64wUU="; + }) + ]; + + nativeBuildInputs = [ + docbook-xsl-nons + gettext + libxslt + meson + ninja + pkg-config + python3 + shared-mime-info + wrapGAppsHook + ]; + + buildInputs = [ + accountsservice + adwaita-icon-theme + cheese + clutter + clutter-gtk + colord + colord-gtk + epoxy + fontconfig + gdk-pixbuf + glib + glib-networking + gnome-bluetooth + gnome-desktop + gnome-online-accounts + gnome-remote-desktop # optional, sharing panel + gnome-settings-daemon + gnome-user-share # optional, sharing panel + grilo + grilo-plugins # for setting wallpaper from Flickr + gsettings-desktop-schemas + gsound + gtk3 + ibus + libcanberra-gtk3 + libgtop + libgudev + libhandy + libkrb5 + libnma + libpulseaudio + libpwquality + librsvg + libsecret + libsoup + libwacom + libxml2 + modemmanager + mutter # schemas for the keybindings + networkmanager + polkit + samba + tracker + tracker-miners # for search locations dialog + udisks2 + upower + ]; + + postPatch = '' + chmod +x build-aux/meson/meson_post_install.py # patchShebangs requires executable file + patchShebangs build-aux/meson/meson_post_install.py + ''; + + preFixup = '' + gappsWrapperArgs+=( + --prefix XDG_DATA_DIRS : "${sound-theme-freedesktop}/share" + # Thumbnailers (for setting user profile pictures) + --prefix XDG_DATA_DIRS : "${gdk-pixbuf}/share" + --prefix XDG_DATA_DIRS : "${librsvg}/share" + # WM keyboard shortcuts + --prefix XDG_DATA_DIRS : "${mutter}/share" + ) + for i in $out/share/applications/*; do + substituteInPlace $i --replace "Exec=gnome-control-center" "Exec=$out/bin/gnome-control-center" + done + ''; + + passthru = { + updateScript = gnome.updateScript { + packageName = pname; + attrPath = "gnome.${pname}"; + }; + }; + + meta = with lib; { + description = "Utilities to configure the GNOME desktop"; + license = licenses.gpl2Plus; + maintainers = teams.gnome.members; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome/core/gnome-control-center/paths.patch b/pkgs/desktops/gnome/core/gnome-control-center/paths.patch new file mode 100644 index 0000000000000..a6787477b8144 --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-control-center/paths.patch @@ -0,0 +1,194 @@ +diff --git a/panels/color/cc-color-panel.c b/panels/color/cc-color-panel.c +index 603178efc..c363a6a5c 100644 +--- a/panels/color/cc-color-panel.c ++++ b/panels/color/cc-color-panel.c +@@ -591,7 +591,7 @@ gcm_prefs_calibrate_cb (CcColorPanel *prefs) + + /* run with modal set */ + argv = g_ptr_array_new_with_free_func (g_free); +- g_ptr_array_add (argv, g_strdup ("gcm-calibrate")); ++ g_ptr_array_add (argv, g_build_filename ("@gcm@", "bin", "gcm-calibrate", NULL)); + g_ptr_array_add (argv, g_strdup ("--device")); + g_ptr_array_add (argv, g_strdup (cd_device_get_id (prefs->current_device))); + g_ptr_array_add (argv, g_strdup ("--parent-window")); +@@ -1029,7 +1029,7 @@ gcm_prefs_profile_view (CcColorPanel *prefs, CdProfile *profile) + + /* open up gcm-viewer as a info pane */ + argv = g_ptr_array_new_with_free_func (g_free); +- g_ptr_array_add (argv, g_strdup ("gcm-viewer")); ++ g_ptr_array_add (argv, g_build_filename ("@gcm@", "bin", "gcm-viewer", NULL)); + g_ptr_array_add (argv, g_strdup ("--profile")); + g_ptr_array_add (argv, g_strdup (cd_profile_get_id (profile))); + g_ptr_array_add (argv, g_strdup ("--parent-window")); +@@ -1275,15 +1275,12 @@ gcm_prefs_device_clicked (CcColorPanel *prefs, CdDevice *device) + static void + gcm_prefs_profile_clicked (CcColorPanel *prefs, CdProfile *profile, CdDevice *device) + { +- g_autofree gchar *s = NULL; +- + /* get profile */ + g_debug ("selected profile = %s", + cd_profile_get_filename (profile)); + + /* allow getting profile info */ +- if (cd_profile_get_filename (profile) != NULL && +- (s = g_find_program_in_path ("gcm-viewer")) != NULL) ++ if (cd_profile_get_filename (profile) != NULL) + gtk_widget_set_sensitive (prefs->toolbutton_profile_view, TRUE); + else + gtk_widget_set_sensitive (prefs->toolbutton_profile_view, FALSE); +diff --git a/panels/datetime/tz.h b/panels/datetime/tz.h +index a2376f8a4..98769e08f 100644 +--- a/panels/datetime/tz.h ++++ b/panels/datetime/tz.h +@@ -27,11 +27,7 @@ + + G_BEGIN_DECLS + +-#ifndef __sun +-# define TZ_DATA_FILE "/usr/share/zoneinfo/zone.tab" +-#else +-# define TZ_DATA_FILE "/usr/share/lib/zoneinfo/tab/zone_sun.tab" +-#endif ++#define TZ_DATA_FILE "@tzdata@/share/zoneinfo/zone.tab" + + typedef struct _TzDB TzDB; + typedef struct _TzLocation TzLocation; +diff --git a/panels/info-overview/cc-info-overview-panel.c b/panels/info-overview/cc-info-overview-panel.c +index bd0e07762..0e71351f8 100644 +--- a/panels/info-overview/cc-info-overview-panel.c ++++ b/panels/info-overview/cc-info-overview-panel.c +@@ -172,7 +172,7 @@ load_gnome_version (char **version, + gsize length; + g_autoptr(VersionData) data = NULL; + +- if (!g_file_get_contents (DATADIR "/gnome/gnome-version.xml", ++ if (!g_file_get_contents ("@gnome_desktop@/share/gnome/gnome-version.xml", + &contents, + &length, + &error)) +diff --git a/panels/keyboard/cc-input-list-box.c b/panels/keyboard/cc-input-list-box.c +index 6c2cb5614..8f57159cc 100644 +--- a/panels/keyboard/cc-input-list-box.c ++++ b/panels/keyboard/cc-input-list-box.c +@@ -223,10 +223,10 @@ row_layout_cb (CcInputListBox *self, + layout_variant = cc_input_source_get_layout_variant (source); + + if (layout_variant && layout_variant[0]) +- commandline = g_strdup_printf ("gkbd-keyboard-display -l \"%s\t%s\"", ++ commandline = g_strdup_printf ("@libgnomekbd@/bin/gkbd-keyboard-display -l \"%s\t%s\"", + layout, layout_variant); + else +- commandline = g_strdup_printf ("gkbd-keyboard-display -l %s", ++ commandline = g_strdup_printf ("@libgnomekbd@/bin/gkbd-keyboard-display -l %s", + layout); + + g_spawn_command_line_async (commandline, NULL); +diff --git a/panels/network/connection-editor/net-connection-editor.c b/panels/network/connection-editor/net-connection-editor.c +index 505b8ee25..62e94009f 100644 +--- a/panels/network/connection-editor/net-connection-editor.c ++++ b/panels/network/connection-editor/net-connection-editor.c +@@ -267,9 +267,9 @@ net_connection_editor_do_fallback (NetConnectionEditor *self, const gchar *type) + g_autoptr(GError) error = NULL; + + if (self->is_new_connection) { +- cmdline = g_strdup_printf ("nm-connection-editor --type='%s' --create", type); ++ cmdline = g_strdup_printf ("@networkmanagerapplet@/bin/nm-connection-editor --type='%s' --create", type); + } else { +- cmdline = g_strdup_printf ("nm-connection-editor --edit='%s'", ++ cmdline = g_strdup_printf ("@networkmanagerapplet@/bin/nm-connection-editor --edit='%s'", + nm_connection_get_uuid (self->connection)); + } + +diff --git a/panels/network/net-device-bluetooth.c b/panels/network/net-device-bluetooth.c +index 74dfb0e9a..5f53d1a20 100644 +--- a/panels/network/net-device-bluetooth.c ++++ b/panels/network/net-device-bluetooth.c +@@ -90,7 +90,7 @@ nm_device_bluetooth_refresh_ui (NetDeviceBluetooth *self) + update_off_switch_from_device_state (self->device_off_switch, state, self); + + /* set up the Options button */ +- path = g_find_program_in_path ("nm-connection-editor"); ++ path = g_find_program_in_path ("@networkmanagerapplet@/bin/nm-connection-editor"); + gtk_widget_set_visible (GTK_WIDGET (self->options_button), state != NM_DEVICE_STATE_UNMANAGED && path != NULL); + } + +@@ -141,7 +141,7 @@ options_button_clicked_cb (NetDeviceBluetooth *self) + + connection = net_device_get_find_connection (self->client, self->device); + uuid = nm_connection_get_uuid (connection); +- cmdline = g_strdup_printf ("nm-connection-editor --edit %s", uuid); ++ cmdline = g_strdup_printf ("@networkmanagerapplet@/bin/nm-connection-editor --edit %s", uuid); + g_debug ("Launching '%s'\n", cmdline); + if (!g_spawn_command_line_async (cmdline, &error)) + g_warning ("Failed to launch nm-connection-editor: %s", error->message); +@@ -185,7 +185,7 @@ net_device_bluetooth_init (NetDeviceBluetooth *self) + + gtk_widget_init_template (GTK_WIDGET (self)); + +- path = g_find_program_in_path ("nm-connection-editor"); ++ path = g_find_program_in_path ("@networkmanagerapplet@/bin/nm-connection-editor"); + gtk_widget_set_visible (GTK_WIDGET (self->options_button), path != NULL); + } + +diff --git a/panels/network/net-device-mobile.c b/panels/network/net-device-mobile.c +index 34eb86241..50d0a2bed 100644 +--- a/panels/network/net-device-mobile.c ++++ b/panels/network/net-device-mobile.c +@@ -508,7 +508,7 @@ options_button_clicked_cb (NetDeviceMobile *self) + + connection = net_device_get_find_connection (self->client, self->device); + uuid = nm_connection_get_uuid (connection); +- cmdline = g_strdup_printf ("nm-connection-editor --edit %s", uuid); ++ cmdline = g_strdup_printf ("@networkmanagerapplet@/bin/nm-connection-editor --edit %s", uuid); + g_debug ("Launching '%s'\n", cmdline); + if (!g_spawn_command_line_async (cmdline, &error)) + g_warning ("Failed to launch nm-connection-editor: %s", error->message); +@@ -797,7 +797,7 @@ net_device_mobile_init (NetDeviceMobile *self) + + self->cancellable = g_cancellable_new (); + +- path = g_find_program_in_path ("nm-connection-editor"); ++ path = g_find_program_in_path ("@networkmanagerapplet@/bin/nm-connection-editor"); + gtk_widget_set_visible (GTK_WIDGET (self->options_button), path != NULL); + } + +diff --git a/panels/printers/pp-host.c b/panels/printers/pp-host.c +index a31a606e3..ed5133d29 100644 +--- a/panels/printers/pp-host.c ++++ b/panels/printers/pp-host.c +@@ -256,7 +256,7 @@ _pp_host_get_snmp_devices_thread (GTask *task, + devices = g_ptr_array_new_with_free_func (g_object_unref); + + argv = g_new0 (gchar *, 3); +- argv[0] = g_strdup ("/usr/lib/cups/backend/snmp"); ++ argv[0] = g_strdup ("@cups@/lib/cups/backend/snmp"); + argv[1] = g_strdup (priv->hostname); + + /* Use SNMP to get printer's informations */ +diff --git a/panels/user-accounts/run-passwd.c b/panels/user-accounts/run-passwd.c +index 86f53d4fc..0b052856f 100644 +--- a/panels/user-accounts/run-passwd.c ++++ b/panels/user-accounts/run-passwd.c +@@ -150,7 +150,7 @@ spawn_passwd (PasswdHandler *passwd_handler, GError **error) + gchar **envp; + gint my_stdin, my_stdout, my_stderr; + +- argv[0] = "/usr/bin/passwd"; /* Is it safe to rely on a hard-coded path? */ ++ argv[0] = "/run/wrappers/bin/passwd"; /* Is it safe to rely on a hard-coded path? */ + argv[1] = NULL; + + envp = g_get_environ (); +diff --git a/tests/datetime/test-endianess.c b/tests/datetime/test-endianess.c +index 9cb92007a..84d2f0fa3 100644 +--- a/tests/datetime/test-endianess.c ++++ b/tests/datetime/test-endianess.c +@@ -26,7 +26,7 @@ test_endianess (void) + g_autoptr(GDir) dir = NULL; + const char *name; + +- dir = g_dir_open ("/usr/share/i18n/locales/", 0, NULL); ++ dir = g_dir_open ("@glibc@/share/i18n/locales/", 0, NULL); + if (dir == NULL) { + /* Try with /usr/share/locale/ + * https://bugzilla.gnome.org/show_bug.cgi?id=646780 */ diff --git a/pkgs/desktops/gnome/core/gnome-desktop/bubblewrap-paths.patch b/pkgs/desktops/gnome/core/gnome-desktop/bubblewrap-paths.patch new file mode 100644 index 0000000000000..57eb4b3d44a9a --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-desktop/bubblewrap-paths.patch @@ -0,0 +1,15 @@ +--- a/libgnome-desktop/gnome-desktop-thumbnail-script.c ++++ b/libgnome-desktop/gnome-desktop-thumbnail-script.c +@@ -536,9 +536,9 @@ add_bwrap (GPtrArray *array, + g_return_val_if_fail (script->s_infile != NULL, FALSE); + + add_args (array, +- "bwrap", +- "--ro-bind", "/usr", "/usr", +- "--ro-bind", "/etc/ld.so.cache", "/etc/ld.so.cache", ++ "@bubblewrap_bin@", ++ "--ro-bind", "@storeDir@", "@storeDir@", ++ "--ro-bind", "/run/current-system", "/run/current-system", + NULL); + + /* These directories might be symlinks into /usr/... */ diff --git a/pkgs/desktops/gnome/core/gnome-desktop/default.nix b/pkgs/desktops/gnome/core/gnome-desktop/default.nix new file mode 100644 index 0000000000000..56bd074c2cb90 --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-desktop/default.nix @@ -0,0 +1,96 @@ +{ lib +, stdenv +, fetchurl +, substituteAll +, pkg-config +, libxslt +, ninja +, gnome +, gtk3 +, glib +, gettext +, libxml2 +, xkeyboard_config +, libxkbcommon +, isocodes +, meson +, wayland +, libseccomp +, systemd +, bubblewrap +, gobject-introspection +, gtk-doc +, docbook-xsl-nons +, gsettings-desktop-schemas +}: + +stdenv.mkDerivation rec { + pname = "gnome-desktop"; + version = "40.1"; + + outputs = [ "out" "dev" "devdoc" ]; + + src = fetchurl { + url = "mirror://gnome/sources/gnome-desktop/${lib.versions.major version}/${pname}-${version}.tar.xz"; + sha256 = "sha256-igeJcwUhnFaZVJriBI9xVVFe+Xx85NZYXd2hXVhZ4c8="; + }; + + patches = [ + (substituteAll { + src = ./bubblewrap-paths.patch; + bubblewrap_bin = "${bubblewrap}/bin/bwrap"; + inherit (builtins) storeDir; + }) + ]; + + nativeBuildInputs = [ + pkg-config + meson + ninja + gettext + libxslt + libxml2 + gobject-introspection + gtk-doc + docbook-xsl-nons + glib + ]; + + buildInputs = [ + bubblewrap + xkeyboard_config + libxkbcommon # for xkbregistry + isocodes + wayland + gtk3 + glib + libseccomp + systemd + ]; + + propagatedBuildInputs = [ + gsettings-desktop-schemas + ]; + + mesonFlags = [ + "-Dgtk_doc=true" + "-Ddesktop_docs=false" + ]; + + separateDebugInfo = stdenv.isLinux; + + passthru = { + updateScript = gnome.updateScript { + packageName = "gnome-desktop"; + attrPath = "gnome.gnome-desktop"; + }; + }; + + meta = with lib; { + description = "Library with common API for various GNOME modules"; + homepage = "https://gitlab.gnome.org/GNOME/gnome-desktop"; + license = with licenses; [ gpl2Plus lgpl2Plus ]; + platforms = platforms.linux; + maintainers = teams.gnome.members; + }; +} diff --git a/pkgs/desktops/gnome/core/gnome-dictionary/default.nix b/pkgs/desktops/gnome/core/gnome-dictionary/default.nix new file mode 100644 index 0000000000000..a399c4e85377c --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-dictionary/default.nix @@ -0,0 +1,36 @@ +{ lib, stdenv, fetchurl, meson, ninja, pkg-config, desktop-file-utils, appstream-glib, libxslt +, libxml2, gettext, itstool, wrapGAppsHook, docbook_xsl, docbook_xml_dtd_43 +, gnome, gtk3, glib, gsettings-desktop-schemas }: + +stdenv.mkDerivation rec { + pname = "gnome-dictionary"; + version = "40.0"; + + src = fetchurl { + url = "mirror://gnome/sources/gnome-dictionary/${lib.versions.major version}/${pname}-${version}.tar.xz"; + sha256 = "1d8dhcfys788vv27v34i3s3x3jdvdi2kqn2a5p8c937a9hm0qr9f"; + }; + + doCheck = true; + + nativeBuildInputs = [ + meson ninja pkg-config wrapGAppsHook libxml2 gettext itstool + desktop-file-utils appstream-glib libxslt docbook_xsl docbook_xml_dtd_43 + ]; + buildInputs = [ gtk3 glib gsettings-desktop-schemas gnome.adwaita-icon-theme ]; + + passthru = { + updateScript = gnome.updateScript { + packageName = "gnome-dictionary"; + attrPath = "gnome.gnome-dictionary"; + }; + }; + + meta = with lib; { + homepage = "https://wiki.gnome.org/Apps/Dictionary"; + description = "Dictionary is the GNOME application to look up definitions"; + maintainers = teams.gnome.members; + license = licenses.gpl2; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome/core/gnome-disk-utility/default.nix b/pkgs/desktops/gnome/core/gnome-disk-utility/default.nix new file mode 100644 index 0000000000000..c11a1df883a0b --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-disk-utility/default.nix @@ -0,0 +1,85 @@ +{ lib +, stdenv +, gettext +, fetchurl +, pkg-config +, udisks2 +, libhandy +, libsecret +, libdvdread +, meson +, ninja +, gtk3 +, glib +, wrapGAppsHook +, python3 +, libnotify +, itstool +, gnome +, libxml2 +, gsettings-desktop-schemas +, libcanberra-gtk3 +, libxslt +, docbook-xsl-nons +, libpwquality +, systemd +}: + +stdenv.mkDerivation rec { + pname = "gnome-disk-utility"; + version = "40.1"; + + src = fetchurl { + url = "mirror://gnome/sources/gnome-disk-utility/${lib.versions.major version}/${pname}-${version}.tar.xz"; + sha256 = "sha256-KkuZrBHKIzlLKMVYS56WKE6MWk2mXPBiB95U9Csf8UE="; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + gettext + itstool + libxslt + docbook-xsl-nons + wrapGAppsHook + python3 + libxml2 + ]; + + buildInputs = [ + gtk3 + glib + libhandy + libsecret + libpwquality + libnotify + libdvdread + libcanberra-gtk3 + udisks2 + gnome.adwaita-icon-theme + systemd + gnome.gnome-settings-daemon + gsettings-desktop-schemas + ]; + + postPatch = '' + chmod +x meson_post_install.py # patchShebangs requires executable file + patchShebangs meson_post_install.py + ''; + + passthru = { + updateScript = gnome.updateScript { + packageName = "gnome-disk-utility"; + attrPath = "gnome.gnome-disk-utility"; + }; + }; + + meta = with lib; { + homepage = "https://wiki.gnome.org/Apps/Disks"; + description = "A udisks graphical front-end"; + maintainers = teams.gnome.members; + license = licenses.gpl2Plus; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome/core/gnome-font-viewer/default.nix b/pkgs/desktops/gnome/core/gnome-font-viewer/default.nix new file mode 100644 index 0000000000000..622a7de1bffa2 --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-font-viewer/default.nix @@ -0,0 +1,35 @@ +{ lib, stdenv, meson, ninja, gettext, fetchurl +, pkg-config, gtk3, glib, libxml2, gnome-desktop, adwaita-icon-theme, libhandy +, wrapGAppsHook, gnome, harfbuzz }: + +stdenv.mkDerivation rec { + pname = "gnome-font-viewer"; + version = "40.0"; + + src = fetchurl { + url = "mirror://gnome/sources/gnome-font-viewer/${lib.versions.major version}/${pname}-${version}.tar.xz"; + sha256 = "0hpyi0sz3gcqqs9lkwyk8b6hr39m3n27432x98kxr436jj37dk6j"; + }; + + doCheck = true; + + nativeBuildInputs = [ meson ninja pkg-config gettext wrapGAppsHook libxml2 ]; + buildInputs = [ gtk3 glib gnome-desktop adwaita-icon-theme harfbuzz libhandy ]; + + # Do not run meson-postinstall.sh + preConfigure = "sed -i '2,$ d' meson-postinstall.sh"; + + passthru = { + updateScript = gnome.updateScript { + packageName = "gnome-font-viewer"; + attrPath = "gnome.gnome-font-viewer"; + }; + }; + + meta = with lib; { + description = "Program that can preview fonts and create thumbnails for fonts"; + maintainers = teams.gnome.members; + license = licenses.gpl2; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome/core/gnome-initial-setup/0001-fix-paths.patch b/pkgs/desktops/gnome/core/gnome-initial-setup/0001-fix-paths.patch new file mode 100644 index 0000000000000..2323759522535 --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-initial-setup/0001-fix-paths.patch @@ -0,0 +1,62 @@ +From 1ae0eca39ba6af27f37e2fe81395b91a2761a408 Mon Sep 17 00:00:00 2001 +Message-Id: <1ae0eca39ba6af27f37e2fe81395b91a2761a408.1600627676.git-series.worldofpeace@protonmail.ch> +From: WORLDofPEACE <worldofpeace@protonmail.ch> +Date: Sun, 20 Sep 2020 14:46:59 -0400 +Subject: [PATCH] fix paths + +--- + gnome-initial-setup/pages/keyboard/cc-input-chooser.c | 6 +++--- + gnome-initial-setup/pages/timezone/tz.h | 4 ++-- + 3 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/gnome-initial-setup/pages/keyboard/cc-input-chooser.c b/gnome-initial-setup/pages/keyboard/cc-input-chooser.c +index 196abf6..613d0e5 100644 +--- a/gnome-initial-setup/pages/keyboard/cc-input-chooser.c ++++ b/gnome-initial-setup/pages/keyboard/cc-input-chooser.c +@@ -177,9 +177,9 @@ preview_cb (GtkLabel *label, + return TRUE; + + if (variant[0]) +- commandline = g_strdup_printf ("gkbd-keyboard-display -l \"%s\t%s\"", layout, variant); ++ commandline = g_strdup_printf ("@libgnomekbd@/bin/gkbd-keyboard-display -l \"%s\t%s\"", layout, variant); + else +- commandline = g_strdup_printf ("gkbd-keyboard-display -l %s", layout); ++ commandline = g_strdup_printf ("@libgnomekbd@/bin/gkbd-keyboard-display -l %s", layout); + g_spawn_command_line_async (commandline, NULL); + g_free (commandline); + +@@ -831,7 +831,7 @@ cc_input_chooser_class_init (CcInputChooserClass *klass) + g_param_spec_string ("showing-extra", "", "", "", + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); + +- signals[CHANGED] = ++ signals[CHANGED] = + g_signal_new ("changed", + G_TYPE_FROM_CLASS (object_class), + G_SIGNAL_RUN_FIRST, +diff --git a/gnome-initial-setup/pages/timezone/tz.h b/gnome-initial-setup/pages/timezone/tz.h +index a2376f8..5cb7bc9 100644 +--- a/gnome-initial-setup/pages/timezone/tz.h ++++ b/gnome-initial-setup/pages/timezone/tz.h +@@ -4,7 +4,7 @@ + * Copyright (C) 2000-2001 Ximian, Inc. + * + * Authors: Hans Petter Jansson <hpj@ximian.com> +- * ++ * + * Largely based on Michael Fulbright's work on Anaconda. + * + * This program is free software; you can redistribute it and/or modify +@@ -28,7 +28,7 @@ + G_BEGIN_DECLS + + #ifndef __sun +-# define TZ_DATA_FILE "/usr/share/zoneinfo/zone.tab" ++# define TZ_DATA_FILE "@tzdata@/share/zoneinfo/zone.tab" + #else + # define TZ_DATA_FILE "/usr/share/lib/zoneinfo/tab/zone_sun.tab" + #endif + +base-commit: 5132e206a6bf81964450561d68473ac015760455 +-- +git-series 0.9.1 diff --git a/pkgs/desktops/gnome/core/gnome-initial-setup/default.nix b/pkgs/desktops/gnome/core/gnome-initial-setup/default.nix new file mode 100644 index 0000000000000..6d57e29a596df --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-initial-setup/default.nix @@ -0,0 +1,106 @@ +{ lib, stdenv +, fetchurl +, substituteAll +, gettext +, meson +, ninja +, pkg-config +, wrapGAppsHook +, gnome +, accountsservice +, fontconfig +, gdm +, geoclue2 +, geocode-glib +, glib +, gnome-desktop +, gnome-online-accounts +, gtk3 +, libgweather +, json-glib +, krb5 +, libpwquality +, librest +, libsecret +, networkmanager +, pango +, polkit +, webkitgtk +, systemd +, libnma +, tzdata +, libgnomekbd +, gsettings-desktop-schemas +}: + +stdenv.mkDerivation rec { + pname = "gnome-initial-setup"; + version = "40.1"; + + src = fetchurl { + url = "mirror://gnome/sources/${pname}/${lib.versions.major version}/${pname}-${version}.tar.xz"; + sha256 = "10zf87n6c947k9rkk2rqc9cbfwcvq23axq3rf7x1an7npv3414gi"; + }; + + patches = [ + (substituteAll { + src = ./0001-fix-paths.patch; + inherit tzdata libgnomekbd; + }) + ]; + + nativeBuildInputs = [ + gettext + meson + ninja + pkg-config + systemd + wrapGAppsHook + ]; + + buildInputs = [ + accountsservice + fontconfig + gdm + geoclue2 + geocode-glib + glib + gnome-desktop + gnome-online-accounts + gsettings-desktop-schemas + gtk3 + json-glib + krb5 + libgweather + libnma + libpwquality + librest + libsecret + networkmanager + pango + polkit + webkitgtk + ]; + + mesonFlags = [ + "-Dcheese=disabled" + "-Dibus=disabled" + "-Dparental_controls=disabled" + "-Dvendor-conf-file=${./vendor.conf}" + ]; + + passthru = { + updateScript = gnome.updateScript { + packageName = pname; + attrPath = "gnome.${pname}"; + }; + }; + + meta = with lib; { + description = "Simple, easy, and safe way to prepare a new system"; + homepage = "https://gitlab.gnome.org/GNOME/gnome-initial-setup"; + license = licenses.gpl2Plus; + platforms = platforms.linux; + maintainers = teams.gnome.members; + }; +} diff --git a/pkgs/desktops/gnome/core/gnome-initial-setup/vendor.conf b/pkgs/desktops/gnome/core/gnome-initial-setup/vendor.conf new file mode 100644 index 0000000000000..a06b37e100edc --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-initial-setup/vendor.conf @@ -0,0 +1,5 @@ +# Disable pages not right for NixOS +# For example user accounts should be preconfigured +# and we can't modify system time with systemd. +[pages] +skip=account;software;password;timezone; diff --git a/pkgs/desktops/gnome/core/gnome-keyring/default.nix b/pkgs/desktops/gnome/core/gnome-keyring/default.nix new file mode 100644 index 0000000000000..8c9815509e2d5 --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-keyring/default.nix @@ -0,0 +1,102 @@ +{ lib +, stdenv +, fetchurl +, pkg-config +, dbus +, libgcrypt +, pam +, python2 +, glib +, libxslt +, gettext +, gcr +, libcap_ng +, libselinux +, p11-kit +, openssh +, wrapGAppsHook +, docbook-xsl-nons +, docbook_xml_dtd_43 +, gnome +}: + +stdenv.mkDerivation rec { + pname = "gnome-keyring"; + version = "40.0"; + + outputs = [ "out" "dev" ]; + + src = fetchurl { + url = "mirror://gnome/sources/gnome-keyring/${lib.versions.major version}/${pname}-${version}.tar.xz"; + sha256 = "0cdrlcw814zayhvlaxqs1sm9bqlfijlp22dzzd0g5zg2isq4vlm3"; + }; + + nativeBuildInputs = [ + pkg-config + gettext + libxslt + docbook-xsl-nons + docbook_xml_dtd_43 + wrapGAppsHook + ]; + + buildInputs = [ + glib + libgcrypt + pam + openssh + libcap_ng + libselinux + gcr + p11-kit + ]; + + # In 3.20.1, tests do not support Python 3 + checkInputs = [ dbus python2 ]; + + configureFlags = [ + "--with-pkcs11-config=${placeholder "out"}/etc/pkcs11/" # installation directories + "--with-pkcs11-modules=${placeholder "out"}/lib/pkcs11/" + ]; + + # Tends to fail non-deterministically. + # - https://github.com/NixOS/nixpkgs/issues/55293 + # - https://github.com/NixOS/nixpkgs/issues/51121 + doCheck = false; + + postPatch = '' + patchShebangs build + ''; + + checkPhase = '' + export HOME=$(mktemp -d) + dbus-run-session \ + --config-file=${dbus.daemon}/share/dbus-1/session.conf \ + make check + ''; + + # Use wrapped gnome-keyring-daemon with cap_ipc_lock=ep + postFixup = '' + files=($out/etc/xdg/autostart/* $out/share/dbus-1/services/*) + + for file in ''${files[*]}; do + substituteInPlace $file \ + --replace "$out/bin/gnome-keyring-daemon" "/run/wrappers/bin/gnome-keyring-daemon" + done + ''; + + passthru = { + updateScript = gnome.updateScript { + packageName = "gnome-keyring"; + attrPath = "gnome.gnome-keyring"; + }; + }; + + meta = with lib; { + description = "Collection of components in GNOME that store secrets, passwords, keys, certificates and make them available to applications"; + homepage = "https://wiki.gnome.org/Projects/GnomeKeyring"; + license = licenses.gpl2; + maintainers = teams.gnome.members; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome/core/gnome-online-miners/default.nix b/pkgs/desktops/gnome/core/gnome-online-miners/default.nix new file mode 100644 index 0000000000000..95fdf35b8831b --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-online-miners/default.nix @@ -0,0 +1,116 @@ +{ lib, stdenv +, fetchurl +, fetchpatch +, autoconf-archive +, autoreconfHook +, pkg-config +, glib +, gnome +, libxml2 +, libgdata +, grilo +, libzapojit +, grilo-plugins +, gnome-online-accounts +, libmediaart +, tracker +, gfbgraph +, librest +, libsoup +, json-glib +, gmp +, openssl +, dleyna-server +, wrapGAppsHook +}: + +stdenv.mkDerivation rec { + pname = "gnome-online-miners"; + version = "3.34.0"; + + src = fetchurl { + url = "mirror://gnome/sources/gnome-online-miners/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; + sha256 = "1n2jz9i8a42zwxx5h8j2gdy6q1vyydh4vl00r0al7w8jzdh24p44"; + }; + + patches = [ + # Fix use after free + # https://gitlab.gnome.org/GNOME/gnome-online-miners/merge_requests/4 + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/gnome-online-miners/commit/9eb57c6a8cd1a925c508646edae936eee0a8e46b.patch"; + sha256 = "O1GRnzs33I0mFzrNDFkTGiBKstq5krYg7fwj60367TA="; + }) + + # Port to Tracker 3 + # https://gitlab.gnome.org/GNOME/gnome-online-miners/merge_requests/3 + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/gnome-online-miners/commit/2d3798252807cad9eb061ed2b37e35170c1a1daf.patch"; + sha256 = "hwrkxroMpTfOwJAPkYQFdDCroZ2qSsvOgDetrJDig20="; + }) + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/gnome-online-miners/commit/1548c0c527f0e4389047448d7d3b6cff55278c8e.patch"; + sha256 = "U9w81c9Kze7kv5KHeGqvDeSNHzSayVrUG0XYsYMa1sg="; + }) + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/gnome-online-miners/commit/941ebd8890c9ac4f75a1f58ccbea9731f46ad912.patch"; + sha256 = "JHtDlZ54/BlSiUA3ROHfCTtTKSin3g6JNm8NS6pYML8="; + }) + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/gnome-online-miners/commit/d1681a64bc3f65894af2549e3ba2bffbaf6f539a.patch"; + sha256 = "9ZEatz5I81UAnjS1qCGWYDQQOxg/qp9Tg3xG/a+3goc="; + }) + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/gnome-online-miners/commit/3d2af8785c84d6e50d8a8e6a2569a4b709184e94.patch"; + sha256 = "7bdUE2k6g3Z8sdGYEb6pUm1/wbKDe4BHbylXUzfuTG0="; + }) + ]; + + nativeBuildInputs = [ + # patch changes configure.ac + autoconf-archive + autoreconfHook + + pkg-config + wrapGAppsHook + ]; + + buildInputs = [ + glib + libgdata + libxml2 + libsoup + gmp + openssl + grilo + libzapojit + grilo-plugins + gnome-online-accounts + libmediaart + tracker + gfbgraph + json-glib + librest + dleyna-server + ]; + + NIX_CFLAGS_COMPILE = [ + "-Wno-error=format-security" # https://gitlab.gnome.org/GNOME/gnome-online-miners/merge_requests/3/diffs#note_942747 + ]; + + enableParallelBuilding = true; + + passthru = { + updateScript = gnome.updateScript { + packageName = "gnome-online-miners"; + attrPath = "gnome.gnome-online-miners"; + }; + }; + + meta = with lib; { + homepage = "https://wiki.gnome.org/Projects/GnomeOnlineMiners"; + description = "A set of crawlers that go through your online content and index them locally in Tracker"; + maintainers = teams.gnome.members; + license = licenses.gpl2Plus; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome/core/gnome-remote-desktop/default.nix b/pkgs/desktops/gnome/core/gnome-remote-desktop/default.nix new file mode 100644 index 0000000000000..8411b2edecb49 --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-remote-desktop/default.nix @@ -0,0 +1,64 @@ +{ lib, stdenv +, fetchurl +, cairo +, meson +, ninja +, pkg-config +, python3 +, wrapGAppsHook +, glib +, pipewire +, systemd +, libvncserver +, libsecret +, libnotify +, gdk-pixbuf +, freerdp +}: + +stdenv.mkDerivation rec { + pname = "gnome-remote-desktop"; + version = "0.1.9"; + + src = fetchurl { + url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; + hash = "sha256-8iZtp4tBRT7NNRKuzwop3rcMvq16RG/I2sAlEIsJ0M8="; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + python3 + wrapGAppsHook + ]; + + buildInputs = [ + cairo + freerdp + gdk-pixbuf # For libnotify + glib + libnotify + libsecret + libvncserver + pipewire + systemd + ]; + + postPatch = '' + chmod +x meson_post_install.py # patchShebangs requires executable file + patchShebangs meson_post_install.py + ''; + + mesonFlags = [ + "-Dsystemd_user_unit_dir=${placeholder "out"}/lib/systemd/user" + ]; + + meta = with lib; { + homepage = "https://wiki.gnome.org/Projects/Mutter/RemoteDesktop"; + description = "GNOME Remote Desktop server"; + maintainers = teams.gnome.members; + license = licenses.gpl2Plus; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome/core/gnome-screenshot/default.nix b/pkgs/desktops/gnome/core/gnome-screenshot/default.nix new file mode 100644 index 0000000000000..5b02fda3e32ff --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-screenshot/default.nix @@ -0,0 +1,43 @@ +{ lib, stdenv, gettext, libxml2, libhandy, fetchurl, pkg-config, libcanberra-gtk3 +, gtk3, glib, meson, ninja, python3, wrapGAppsHook, appstream-glib, desktop-file-utils +, gnome, gsettings-desktop-schemas }: + +let + pname = "gnome-screenshot"; + version = "40.0"; +in stdenv.mkDerivation rec { + name = "${pname}-${version}"; + + src = fetchurl { + url = "mirror://gnome/sources/${pname}/${lib.versions.major version}/${name}.tar.xz"; + sha256 = "1qm544ymwibk31s30k47vnn79xg30m18r7l4di0c57g375dak31n"; + }; + + doCheck = true; + + postPatch = '' + chmod +x build-aux/postinstall.py # patchShebangs requires executable file + patchShebangs build-aux/postinstall.py + ''; + + nativeBuildInputs = [ meson ninja pkg-config gettext appstream-glib libxml2 desktop-file-utils python3 wrapGAppsHook ]; + buildInputs = [ + gtk3 glib libcanberra-gtk3 libhandy gnome.adwaita-icon-theme + gsettings-desktop-schemas + ]; + + passthru = { + updateScript = gnome.updateScript { + packageName = pname; + attrPath = "gnome.${pname}"; + }; + }; + + meta = with lib; { + homepage = "https://en.wikipedia.org/wiki/GNOME_Screenshot"; + description = "Utility used in the GNOME desktop environment for taking screenshots"; + maintainers = teams.gnome.members; + license = licenses.gpl2; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome/core/gnome-session/ctl.nix b/pkgs/desktops/gnome/core/gnome-session/ctl.nix new file mode 100644 index 0000000000000..6a274e35bf568 --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-session/ctl.nix @@ -0,0 +1,42 @@ +{ lib +, stdenv +, fetchFromGitHub +, meson +, ninja +, pkg-config +, glib +, systemd +, wrapGAppsHook +}: + +stdenv.mkDerivation rec { + pname = "gnome-session-ctl"; + version = "40.0"; + + src = fetchFromGitHub { + owner = "nix-community"; + repo = pname; + rev = version; + hash = "sha256-gvBmLx8Qoj1vPsOwaZsd9+pTDvU5D7uUts7ZT1pXwNo="; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + wrapGAppsHook + ]; + + buildInputs = [ + glib + systemd + ]; + + meta = with lib; { + description = "gnome-session-ctl extracted from gnome-session for nixpkgs"; + homepage = "https://github.com/nix-community/gnome-session-ctl"; + license = licenses.gpl2Plus; + maintainers = teams.gnome.members; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome/core/gnome-session/default.nix b/pkgs/desktops/gnome/core/gnome-session/default.nix new file mode 100644 index 0000000000000..c1ebc43620715 --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-session/default.nix @@ -0,0 +1,90 @@ +{ fetchurl, lib, stdenv, substituteAll, meson, ninja, pkg-config, gnome, glib, gtk3, gsettings-desktop-schemas +, gnome-desktop, dbus, json-glib, libICE, xmlto, docbook_xsl, docbook_xml_dtd_412, python3 +, libxslt, gettext, makeWrapper, systemd, xorg, epoxy, gnugrep, bash, gnome-session-ctl }: + +stdenv.mkDerivation rec { + pname = "gnome-session"; + version = "40.1.1"; + + outputs = ["out" "sessions"]; + + src = fetchurl { + url = "mirror://gnome/sources/gnome-session/${lib.versions.major version}/${pname}-${version}.tar.xz"; + sha256 = "10nzyhmgkrzk6i70kj7690na0hmsv6qy5bmr10akxq9jxqlphy4w"; + }; + + patches = [ + (substituteAll { + src = ./fix-paths.patch; + gsettings = "${glib.bin}/bin/gsettings"; + dbusLaunch = "${dbus.lib}/bin/dbus-launch"; + grep = "${gnugrep}/bin/grep"; + bash = "${bash}/bin/bash"; + }) + ]; + + mesonFlags = [ "-Dsystemd=true" "-Dsystemd_session=default" ]; + + nativeBuildInputs = [ + meson ninja pkg-config gettext makeWrapper + xmlto libxslt docbook_xsl docbook_xml_dtd_412 python3 + dbus # for DTD + ]; + + buildInputs = [ + glib gtk3 libICE gnome-desktop json-glib xorg.xtrans gnome.adwaita-icon-theme + gnome.gnome-settings-daemon gsettings-desktop-schemas systemd epoxy + ]; + + postPatch = '' + chmod +x meson_post_install.py # patchShebangs requires executable file + patchShebangs meson_post_install.py + + # Use our provided `gnome-session-ctl` + original="@libexecdir@/gnome-session-ctl" + replacement="${gnome-session-ctl}/libexec/gnome-session-ctl" + + find data/ -type f -name "*.service.in" -exec sed -i \ + -e s,$original,$replacement,g \ + {} + + ''; + + # `bin/gnome-session` will reset the environment when run in wayland, we + # therefor wrap `libexec/gnome-session-binary` instead which is the actual + # binary needing wrapping + preFixup = '' + wrapProgram "$out/libexec/gnome-session-binary" \ + --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \ + --suffix XDG_DATA_DIRS : "$out/share:$GSETTINGS_SCHEMAS_PATH" \ + --suffix XDG_DATA_DIRS : "${gnome.gnome-shell}/share"\ + --suffix XDG_CONFIG_DIRS : "${gnome.gnome-settings-daemon}/etc/xdg" + ''; + + # We move the GNOME sessions to another output since gnome-session is a dependency of + # GDM itself. If we do not hide them, it will show broken GNOME sessions when GDM is + # enabled without proper GNOME installation. + postInstall = '' + mkdir $sessions + moveToOutput share/wayland-sessions "$sessions" + moveToOutput share/xsessions "$sessions" + + # Our provided one is being used + rm -rf $out/libexec/gnome-session-ctl + ''; + + passthru = { + updateScript = gnome.updateScript { + packageName = "gnome-session"; + attrPath = "gnome.gnome-session"; + }; + providedSessions = [ "gnome" "gnome-xorg" ]; + }; + + meta = with lib; { + description = "GNOME session manager"; + homepage = "https://wiki.gnome.org/Projects/SessionManagement"; + license = licenses.gpl2Plus; + maintainers = teams.gnome.members; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome/core/gnome-session/fix-paths.patch b/pkgs/desktops/gnome/core/gnome-session/fix-paths.patch new file mode 100644 index 0000000000000..320b3024deee2 --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-session/fix-paths.patch @@ -0,0 +1,42 @@ +diff --git a/gnome-session/gnome-session.in b/gnome-session/gnome-session.in +index ddd1a591..46a3488b 100755 +--- a/gnome-session/gnome-session.in ++++ b/gnome-session/gnome-session.in +@@ -3,17 +3,19 @@ + if [ "x$XDG_SESSION_TYPE" = "xwayland" ] && + [ "x$XDG_SESSION_CLASS" != "xgreeter" ] && + [ -n "$SHELL" ] && +- grep -q "$SHELL" /etc/shells && +- ! (echo "$SHELL" | grep -q "false") && +- ! (echo "$SHELL" | grep -q "nologin"); then ++ @grep@ -q "$SHELL" /etc/shells && ++ ! (echo "$SHELL" | @grep@ -q "false") && ++ ! (echo "$SHELL" | @grep@ -q "nologin"); then + if [ "$1" != '-l' ]; then +- exec bash -c "exec -l '$SHELL' -c '$0 -l $*'" ++ # Make sure the shell actually sets up the environment. ++ unset __NIXOS_SET_ENVIRONMENT_DONE ++ exec @bash@ -c "exec -l '$SHELL' -c '$0 -l $*'" + else + shift + fi + fi + +-SETTING=$(G_MESSAGES_DEBUG='' gsettings get org.gnome.system.locale region) ++SETTING=$(G_MESSAGES_DEBUG='' @gsettings@ get org.gnome.system.locale region) + REGION=${SETTING#\'} + REGION=${REGION%\'} + +diff --git a/gnome-session/main.c b/gnome-session/main.c +index 84edfbe5..e5285489 100644 +--- a/gnome-session/main.c ++++ b/gnome-session/main.c +@@ -215,7 +215,7 @@ require_dbus_session (int argc, + } + new_argv[i + 2] = NULL; + +- if (!execvp ("dbus-launch", new_argv)) { ++ if (!execvp ("@dbusLaunch@", new_argv)) { + g_set_error (error, + G_SPAWN_ERROR, + G_SPAWN_ERROR_FAILED, diff --git a/pkgs/desktops/gnome/core/gnome-settings-daemon/default.nix b/pkgs/desktops/gnome/core/gnome-settings-daemon/default.nix new file mode 100644 index 0000000000000..e091cf2365af3 --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-settings-daemon/default.nix @@ -0,0 +1,133 @@ +{ lib, stdenv +, fetchpatch +, substituteAll +, fetchurl +, meson +, ninja +, pkg-config +, gnome +, perl +, gettext +, gtk3 +, glib +, libnotify +, libgnomekbd +, lcms2 +, libpulseaudio +, alsaLib +, libcanberra-gtk3 +, upower +, colord +, libgweather +, polkit +, gsettings-desktop-schemas +, geoclue2 +, systemd +, libgudev +, libwacom +, libxslt +, libxml2 +, modemmanager +, networkmanager +, gnome-desktop +, geocode-glib +, docbook_xsl +, wrapGAppsHook +, python3 +, tzdata +, nss +, gcr +, gnome-session-ctl +}: + +stdenv.mkDerivation rec { + pname = "gnome-settings-daemon"; + version = "40.0.1"; + + src = fetchurl { + url = "mirror://gnome/sources/gnome-settings-daemon/${lib.versions.major version}/${pname}-${version}.tar.xz"; + sha256 = "08bv32hvsmd8izw0llvldg0c2d71srch4hi8j94jwgm5d4dsrprp"; + }; + + patches = [ + # https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/merge_requests/202 + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/gnome-settings-daemon/commit/aae1e774dd9de22fe3520cf9eb2bfbf7216f5eb0.patch"; + sha256 = "O4m0rOW8Zrgu3Q0p0OA8b951VC0FjYbOUk9MLzB9icI="; + }) + + (substituteAll { + src = ./fix-paths.patch; + inherit tzdata; + }) + ]; + + nativeBuildInputs = [ + meson + ninja + pkg-config + perl + gettext + libxml2 + libxslt + docbook_xsl + wrapGAppsHook + python3 + ]; + + buildInputs = [ + gtk3 + glib + gsettings-desktop-schemas + modemmanager + networkmanager + libnotify + libgnomekbd # for org.gnome.libgnomekbd.keyboard schema + gnome-desktop + lcms2 + libpulseaudio + alsaLib + libcanberra-gtk3 + upower + colord + libgweather + nss + polkit + geocode-glib + geoclue2 + systemd + libgudev + libwacom + gcr + ]; + + mesonFlags = [ + "-Dudev_dir=${placeholder "out"}/lib/udev" + "-Dgnome_session_ctl_path=${gnome-session-ctl}/libexec/gnome-session-ctl" + ]; + + # Default for release buildtype but passed manually because + # we're using plain + NIX_CFLAGS_COMPILE = "-DG_DISABLE_CAST_CHECKS"; + + + postPatch = '' + for f in gnome-settings-daemon/codegen.py plugins/power/gsd-power-constants-update.pl meson_post_install.py; do + chmod +x $f + patchShebangs $f + done + ''; + + passthru = { + updateScript = gnome.updateScript { + packageName = pname; + attrPath = "gnome.${pname}"; + }; + }; + + meta = with lib; { + license = licenses.gpl2Plus; + maintainers = teams.gnome.members; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome/core/gnome-settings-daemon/fix-paths.patch b/pkgs/desktops/gnome/core/gnome-settings-daemon/fix-paths.patch new file mode 100644 index 0000000000000..2229302cab7c0 --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-settings-daemon/fix-paths.patch @@ -0,0 +1,15 @@ +--- a/plugins/datetime/tz.h ++++ b/plugins/datetime/tz.h +@@ -27,11 +27,7 @@ + + #include <glib.h> + +-#ifndef __sun +-# define TZ_DATA_FILE "/usr/share/zoneinfo/zone.tab" +-#else +-# define TZ_DATA_FILE "/usr/share/lib/zoneinfo/tab/zone_sun.tab" +-#endif ++#define TZ_DATA_FILE "@tzdata@/share/zoneinfo/zone.tab" + + typedef struct _TzDB TzDB; + typedef struct _TzLocation TzLocation; diff --git a/pkgs/desktops/gnome/core/gnome-settings-daemon/global-backlight-helper.patch b/pkgs/desktops/gnome/core/gnome-settings-daemon/global-backlight-helper.patch new file mode 100644 index 0000000000000..8f3951af2da85 --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-settings-daemon/global-backlight-helper.patch @@ -0,0 +1,26 @@ +diff --git a/plugins/power/gsd-backlight.c b/plugins/power/gsd-backlight.c +index d7d10fd2..5619d6ad 100644 +--- a/plugins/power/gsd-backlight.c ++++ b/plugins/power/gsd-backlight.c +@@ -358,7 +358,7 @@ gsd_backlight_run_set_helper (GsdBacklight *backlight, GTask *task) + proc = g_subprocess_new (G_SUBPROCESS_FLAGS_STDOUT_SILENCE, + &error, + "pkexec", +- LIBEXECDIR "/gsd-backlight-helper", ++ "/run/current-system/sw/bin/gnome-settings-daemon/gsd-backlight-helper", + g_udev_device_get_sysfs_path (backlight->udev_device), + data->value_str, NULL); + } else { +diff --git a/plugins/power/org.gnome.settings-daemon.plugins.power.policy.in.in b/plugins/power/org.gnome.settings-daemon.plugins.power.policy.in.in +index f16300f8..79d6bd17 100644 +--- a/plugins/power/org.gnome.settings-daemon.plugins.power.policy.in.in ++++ b/plugins/power/org.gnome.settings-daemon.plugins.power.policy.in.in +@@ -25,7 +25,7 @@ + <allow_inactive>no</allow_inactive> + <allow_active>yes</allow_active> + </defaults> +- <annotate key="org.freedesktop.policykit.exec.path">@libexecdir@/gsd-backlight-helper</annotate> ++ <annotate key="org.freedesktop.policykit.exec.path">/run/current-system/sw/bin/gnome-settings-daemon/gsd-backlight-helper</annotate> + </action> + + </policyconfig> diff --git a/pkgs/desktops/gnome/core/gnome-shell-extensions/default.nix b/pkgs/desktops/gnome/core/gnome-shell-extensions/default.nix new file mode 100644 index 0000000000000..6c38b7909590d --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-shell-extensions/default.nix @@ -0,0 +1,73 @@ +{ lib, stdenv, fetchurl, fetchpatch, meson, ninja, gettext, pkg-config, spidermonkey_68, glib +, gnome, gnome-menus, substituteAll }: + +stdenv.mkDerivation rec { + pname = "gnome-shell-extensions"; + version = "40.0"; + + src = fetchurl { + url = "mirror://gnome/sources/gnome-shell-extensions/${lib.versions.major version}/${pname}-${version}.tar.xz"; + sha256 = "15hak4prx2nx1svfii39clxy1lll8crdf7p91if85jcsh6r8ab8p"; + }; + + passthru = { + updateScript = gnome.updateScript { + packageName = pname; + attrPath = "gnome.${pname}"; + }; + }; + + patches = [ + (substituteAll { + src = ./fix_gmenu.patch; + gmenu_path = "${gnome-menus}/lib/girepository-1.0"; + }) + + # Do not show welcome dialog in gnome-classic. + # Needed for gnome-shell 40.1. + # https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/169 + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/gnome-shell-extensions/commit/3e8bbb07ea7109c44d5ac7998f473779e742d041.patch"; + sha256 = "jSmPwSBgRBfPPP9mGVjw1mSWumIXQqtA6tSqHr3U+3w="; + }) + ]; + + doCheck = true; + # 60 is required for tests + # https://gitlab.gnome.org/GNOME/gnome-shell-extensions/blob/3.34.0/meson.build#L23 + checkInputs = [ spidermonkey_68 ]; + + nativeBuildInputs = [ meson ninja pkg-config gettext glib ]; + + mesonFlags = [ "-Dextension_set=all" ]; + + preFixup = '' + # The meson build doesn't compile the schemas. + # Fixup adapted from export-zips.sh in the source. + + extensiondir=$out/share/gnome-shell/extensions + schemadir=${glib.makeSchemaPath "$out" "${pname}-${version}"} + + glib-compile-schemas $schemadir + + for f in $extensiondir/*; do + name=`basename ''${f%%@*}` + uuid=$name@gnome-shell-extensions.gcampax.github.com + schema=$schemadir/org.gnome.shell.extensions.$name.gschema.xml + + if [ -f $schema ]; then + mkdir $f/schemas + ln -s $schema $f/schemas; + glib-compile-schemas $f/schemas + fi + done + ''; + + meta = with lib; { + homepage = "https://wiki.gnome.org/Projects/GnomeShell/Extensions"; + description = "Modify and extend GNOME Shell functionality and behavior"; + maintainers = teams.gnome.members; + license = licenses.gpl2; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome/core/gnome-shell-extensions/fix_gmenu.patch b/pkgs/desktops/gnome/core/gnome-shell-extensions/fix_gmenu.patch new file mode 100644 index 0000000000000..555664e8ae25f --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-shell-extensions/fix_gmenu.patch @@ -0,0 +1,11 @@ +--- a/extensions/apps-menu/extension.js ++++ b/extensions/apps-menu/extension.js +@@ -1,6 +1,8 @@ + /* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */ + /* exported init enable disable */ + ++imports.gi.GIRepository.Repository.prepend_search_path('@gmenu_path@'); ++ + const { + Atk, Clutter, Gio, GLib, GMenu, GObject, Gtk, Meta, Shell, St + } = imports.gi; diff --git a/pkgs/desktops/gnome/core/gnome-shell/default.nix b/pkgs/desktops/gnome/core/gnome-shell/default.nix new file mode 100644 index 0000000000000..66eaafb2cc795 --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-shell/default.nix @@ -0,0 +1,225 @@ +{ fetchurl +, fetchpatch +, fetchgit +, substituteAll +, lib, stdenv +, meson +, ninja +, pkg-config +, gnome +, json-glib +, gettext +, libsecret +, python3 +, polkit +, networkmanager +, gtk-doc +, docbook-xsl-nons +, at-spi2-core +, libstartup_notification +, unzip +, shared-mime-info +, libgweather +, librsvg +, geoclue2 +, perl +, docbook_xml_dtd_45 +, 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 +, gtk4 +, sassc +, systemd +, pipewire +, gst_all_1 +, adwaita-icon-theme +, gnome-bluetooth +, gnome-clocks +, gnome-settings-daemon +, gnome-autoar +, asciidoc-full +, bash-completion +, mesa +}: + +# 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 { + pname = "gnome-shell"; + version = "40.0-unstable-2021-05-01"; + + outputs = [ "out" "devdoc" ]; + + src = fetchgit { + url = "https://gitlab.gnome.org/GNOME/gnome-shell.git"; + rev = "a8a79c03330427808e776c344f7ebc42782a1b5a"; + sha256 = "ivHV0SRpnBqsdC7fu1Xhtd/BA55O0UdbUyDLy5KHNYs="; + fetchSubmodules = true; + }; + # src = fetchurl { + # url = "mirror://gnome/sources/gnome-shell/${lib.versions.major version}/${pname}-${version}.tar.xz"; + # sha256 = "sha256-vOcfQC36qcXiab9lv0iiI0PYlubPmiw0ZpOS1/v2hHg="; + # }; + + patches = [ + # Hardcode paths to various dependencies so that they can be found at runtime. + (substituteAll { + src = ./fix-paths.patch; + inherit libgnomekbd unzip; + gsettings = "${glib.bin}/bin/gsettings"; + }) + + # Use absolute path for libshew installation to make our patched gobject-introspection + # aware of the location to hardcode in the generated GIR file. + ./shew-gir-path.patch + + # Make D-Bus services wrappable. + ./wrap-services.patch + + # Fix greeter logo being too big. + # https://gitlab.gnome.org/GNOME/gnome-shell/issues/2591 + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/gnome-shell/commit/ffb8bd5fa7704ce70ce7d053e03549dd15dce5ae.patch"; + revert = true; + sha256 = "14h7ahlxgly0n3sskzq9dhxzbyb04fn80pv74vz1526396676dzl"; + }) + + # Work around failing fingerprint auth + (fetchpatch { + url = "https://src.fedoraproject.org/rpms/gnome-shell/raw/9a647c460b651aaec0b8a21f046cc289c1999416/f/0001-gdm-Work-around-failing-fingerprint-auth.patch"; + sha256 = "pFvZli3TilUt6YwdZztpB8Xq7O60XfuWUuPMMVSpqLw="; + }) + ]; + + nativeBuildInputs = [ + meson + ninja + pkg-config + gettext + docbook-xsl-nons + docbook_xml_dtd_45 + gtk-doc + perl + wrapGAppsHook + sassc + desktop-file-utils + libxslt.bin + python3 + asciidoc-full + ]; + + buildInputs = [ + systemd + gsettings-desktop-schemas + gnome-keyring + glib + gcr + accountsservice + libsecret + polkit + gdk-pixbuf + librsvg + networkmanager + libstartup_notification + gjs + mutter + libpulseaudio + evolution-data-server + libical + gtk3 + gtk4 + gdm + geoclue2 + adwaita-icon-theme + gnome-bluetooth + gnome-clocks # schemas needed + at-spi2-core + upower + ibus + gnome-desktop + gnome-settings-daemon + gobject-introspection + mesa + + # recording + pipewire + 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 + gnome-autoar + json-glib + ]; + + mesonFlags = [ + "-Dgtk_doc=true" + ]; + + postPatch = '' + patchShebangs src/data-to-c.pl + chmod +x meson/postinstall.py + patchShebangs meson/postinstall.py + + substituteInPlace src/gnome-shell-extension-tool.in --replace "@PYTHON@" "${pythonEnv}/bin/python" + substituteInPlace src/gnome-shell-perf-tool.in --replace "@PYTHON@" "${pythonEnv}/bin/python" + ''; + + preFixup = '' + gappsWrapperArgs+=( + # Until glib’s xdgmime is patched + # Fixes “Failed to load resource:///org/gnome/shell/theme/noise-texture.png: Unrecognized image file format” + --prefix XDG_DATA_DIRS : "${shared-mime-info}/share" + ) + ''; + + postFixup = '' + # The services need typelibs. + for svc in org.gnome.ScreenSaver org.gnome.Shell.Extensions org.gnome.Shell.Notifications org.gnome.Shell.Screencast; do + wrapGApp $out/share/gnome-shell/$svc + done + ''; + + passthru = { + mozillaPlugin = "/lib/mozilla/plugins"; + updateScript = gnome.updateScript { + packageName = "gnome-shell"; + attrPath = "gnome.gnome-shell"; + }; + }; + + meta = with lib; { + description = "Core user interface for the GNOME 3 desktop"; + homepage = "https://wiki.gnome.org/Projects/GnomeShell"; + license = licenses.gpl2Plus; + maintainers = teams.gnome.members; + platforms = platforms.linux; + }; + +} diff --git a/pkgs/desktops/gnome/core/gnome-shell/fix-paths.patch b/pkgs/desktops/gnome/core/gnome-shell/fix-paths.patch new file mode 100644 index 0000000000000..e17a608a2d85e --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-shell/fix-paths.patch @@ -0,0 +1,30 @@ +--- a/js/ui/extensionDownloader.js ++++ b/js/ui/extensionDownloader.js +@@ -86,7 +86,7 @@ + stream.output_stream.write_bytes(contents, null); + stream.close(null); + let [success, pid] = GLib.spawn_async(null, +- ['unzip', '-uod', dir.get_path(), '--', file.get_path()], ++ ['@unzip@/bin/unzip', '-uod', dir.get_path(), '--', file.get_path()], + null, + GLib.SpawnFlags.SEARCH_PATH | GLib.SpawnFlags.DO_NOT_REAP_CHILD, + null); +--- a/js/ui/status/keyboard.js ++++ b/js/ui/status/keyboard.js +@@ -1062,6 +1062,6 @@ class InputSourceIndicator extends PanelMenu.Button { + if (xkbVariant.length > 0) + description = `${description}\t${xkbVariant}`; + +- Util.spawn(['gkbd-keyboard-display', '-l', description]); ++ Util.spawn(['@libgnomekbd@/bin/gkbd-keyboard-display', '-l', description]); + } + }); +--- a/data/org.gnome.Shell-disable-extensions.service ++++ b/data/org.gnome.Shell-disable-extensions.service +@@ -10,5 +10,5 @@ Requisite=gnome-session-stable.timer + [Service] + Type=simple + # Disable extensions +-ExecStart=gsettings set org.gnome.shell disable-user-extensions true ++ExecStart=@gsettings@ set org.gnome.shell disable-user-extensions true + Restart=no diff --git a/pkgs/desktops/gnome/core/gnome-shell/shew-gir-path.patch b/pkgs/desktops/gnome/core/gnome-shell/shew-gir-path.patch new file mode 100644 index 0000000000000..6d888725b5d2e --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-shell/shew-gir-path.patch @@ -0,0 +1,11 @@ +--- a/subprojects/shew/src/meson.build ++++ b/subprojects/shew/src/meson.build +@@ -13,7 +13,7 @@ shew_sources = [ + libshew = library(full_name, + sources: shew_sources, + dependencies: [gtk_dep, x11_dep], +- install_dir: pkglibdir, ++ install_dir: get_option('prefix') / pkglibdir, + install: true, + ) + diff --git a/pkgs/desktops/gnome/core/gnome-shell/wrap-services.patch b/pkgs/desktops/gnome/core/gnome-shell/wrap-services.patch new file mode 100644 index 0000000000000..bc494caea9dd0 --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-shell/wrap-services.patch @@ -0,0 +1,57 @@ +diff --git a/js/dbusServices/dbus-service.in b/js/dbusServices/dbus-service.in +old mode 100644 +new mode 100755 +index 524166102..100b81a63 +--- a/js/dbusServices/dbus-service.in ++++ b/js/dbusServices/dbus-service.in +@@ -1,3 +1,9 @@ ++#!@gjs@ ++ ++// gjs determines the package name from argv[0], which is .*-wrapped ++// so we need to override it to the original one. ++imports.package._findEffectiveEntryPointName = () => '@service@' ++ + imports.package.start({ + name: '@PACKAGE_NAME@', + prefix: '@prefix@', +diff --git a/js/dbusServices/dbus-service.service.in b/js/dbusServices/dbus-service.service.in +index 3b0d09abe..4fd4bb66d 100644 +--- a/js/dbusServices/dbus-service.service.in ++++ b/js/dbusServices/dbus-service.service.in +@@ -1,3 +1,3 @@ + [D-BUS Service] + Name=@service@ +-Exec=@gjs@ @pkgdatadir@/@service@ ++Exec=@pkgdatadir@/@service@ +diff --git a/js/dbusServices/meson.build b/js/dbusServices/meson.build +index c749f45dc..11bcb0c9e 100644 +--- a/js/dbusServices/meson.build ++++ b/js/dbusServices/meson.build +@@ -2,6 +2,7 @@ launcherconf = configuration_data() + launcherconf.set('PACKAGE_NAME', meson.project_name()) + launcherconf.set('prefix', prefix) + launcherconf.set('libdir', libdir) ++launcherconf.set('gjs', gjs.path()) + + dbus_services = { + 'org.gnome.Shell.Extensions': 'extensions', +@@ -11,16 +12,17 @@ dbus_services = { + config_dir = '@0@/..'.format(meson.current_build_dir()) + + foreach service, dir : dbus_services ++ svc_launcherconf = launcherconf ++ svc_launcherconf.set('service', service) + configure_file( + input: 'dbus-service.in', + output: service, +- configuration: launcherconf, ++ configuration: svc_launcherconf, + install_dir: pkgdatadir, + ) + + serviceconf = configuration_data() + serviceconf.set('service', service) +- serviceconf.set('gjs', gjs.path()) + serviceconf.set('pkgdatadir', pkgdatadir) + + configure_file( diff --git a/pkgs/desktops/gnome/core/gnome-software/default.nix b/pkgs/desktops/gnome/core/gnome-software/default.nix new file mode 100644 index 0000000000000..64cd214e8090f --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-software/default.nix @@ -0,0 +1,120 @@ +{ lib +, stdenv +, fetchurl +, substituteAll +, pkg-config +, meson +, ninja +, gettext +, gnome +, wrapGAppsHook +, packagekit +, ostree +, glib +, appstream +, libsoup +, libhandy +, polkit +, isocodes +, gspell +, libxslt +, gobject-introspection +, flatpak +, fwupd +, gtk3 +, gsettings-desktop-schemas +, gnome-desktop +, libxmlb +, gnome-online-accounts +, json-glib +, libsecret +, valgrind-light +, docbook-xsl-nons +, docbook_xml_dtd_42 +, docbook_xml_dtd_43 +, gtk-doc +, desktop-file-utils +, libsysprof-capture +}: + +let + withFwupd = stdenv.isx86_64 || stdenv.isi686; +in + +stdenv.mkDerivation rec { + pname = "gnome-software"; + version = "40.1"; + + src = fetchurl { + url = "mirror://gnome/sources/gnome-software/${lib.versions.major version}/${pname}-${version}.tar.xz"; + sha256 = "16q2902swxsjdxb1nj335sv1bb76rvq4w6dn4yszkwf3s0fd86in"; + }; + + patches = [ + (substituteAll { + src = ./fix-paths.patch; + inherit isocodes; + }) + ]; + + nativeBuildInputs = [ + meson + ninja + pkg-config + gettext + wrapGAppsHook + libxslt + docbook_xml_dtd_42 + docbook_xml_dtd_43 + valgrind-light + docbook-xsl-nons + gtk-doc + desktop-file-utils + gobject-introspection + ]; + + buildInputs = [ + gtk3 + glib + packagekit + appstream + libsoup + libhandy + gsettings-desktop-schemas + gnome-desktop + gspell + json-glib + libsecret + ostree + polkit + flatpak + libxmlb + gnome-online-accounts + libsysprof-capture + ] ++ lib.optionals withFwupd [ + fwupd + ]; + + mesonFlags = [ + "-Dgudev=false" + # FIXME: package malcontent parental controls + "-Dmalcontent=false" + ] ++ lib.optionals (!withFwupd) [ + "-Dfwupd=false" + ]; + + passthru = { + updateScript = gnome.updateScript { + packageName = pname; + attrPath = "gnome.gnome-software"; + }; + }; + + meta = with lib; { + description = "Software store that lets you install and update applications and system extensions"; + homepage = "https://wiki.gnome.org/Apps/Software"; + license = licenses.gpl2Plus; + maintainers = teams.gnome.members; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome/core/gnome-software/fix-paths.patch b/pkgs/desktops/gnome/core/gnome-software/fix-paths.patch new file mode 100644 index 0000000000000..6f443a8a43edb --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-software/fix-paths.patch @@ -0,0 +1,11 @@ +--- a/src/gs-language.c ++++ b/src/gs-language.c +@@ -95,7 +95,7 @@ + g_autoptr(GMarkupParseContext) context = NULL; + + /* find filename */ +- filename = g_build_filename (DATADIR, "xml", "iso-codes", "iso_639.xml", NULL); ++ filename = g_build_filename ("@isocodes@", "share", "xml", "iso-codes", "iso_639.xml", NULL); + if (!g_file_test (filename, G_FILE_TEST_EXISTS)) { + g_free (filename); + filename = g_build_filename ("/usr", "share", "xml", "iso-codes", "iso_639.xml", NULL); diff --git a/pkgs/desktops/gnome/core/gnome-system-monitor/default.nix b/pkgs/desktops/gnome/core/gnome-system-monitor/default.nix new file mode 100644 index 0000000000000..77579be6272da --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-system-monitor/default.nix @@ -0,0 +1,81 @@ +{ lib +, stdenv +, gettext +, fetchurl +, pkg-config +, gtkmm3 +, libxml2 +, bash +, gtk3 +, libhandy +, glib +, wrapGAppsHook +, meson +, ninja +, python3 +, gsettings-desktop-schemas +, itstool +, gnome +, librsvg +, gdk-pixbuf +, libgtop +, systemd +}: + +stdenv.mkDerivation rec { + pname = "gnome-system-monitor"; + version = "40.1"; + + src = fetchurl { + url = "mirror://gnome/sources/gnome-system-monitor/${lib.versions.major version}/${pname}-${version}.tar.xz"; + sha256 = "06hxd4igxas2kyind5jwfq5qbfkknykpdfy2sy3anylhcx1hzczx"; + }; + + nativeBuildInputs = [ + pkg-config + gettext + itstool + wrapGAppsHook + meson + ninja + python3 + ]; + + buildInputs = [ + bash + gtk3 + libhandy + glib + libxml2 + gtkmm3 + libgtop + gdk-pixbuf + gnome.adwaita-icon-theme + librsvg + gsettings-desktop-schemas + systemd + ]; + + doCheck = true; + + postPatch = '' + chmod +x meson_post_install.py # patchShebangs requires executable file + patchShebangs meson_post_install.py + sed -i '/gtk-update-icon-cache/s/^/#/' meson_post_install.py + ''; + + passthru = { + updateScript = gnome.updateScript { + packageName = "gnome-system-monitor"; + attrPath = "gnome.gnome-system-monitor"; + }; + }; + + meta = with lib; { + homepage = "https://wiki.gnome.org/Apps/SystemMonitor"; + description = "System Monitor shows you what programs are running and how much processor time, memory, and disk space are being used"; + maintainers = teams.gnome.members; + license = licenses.gpl2; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome/core/gnome-terminal/default.nix b/pkgs/desktops/gnome/core/gnome-terminal/default.nix new file mode 100644 index 0000000000000..ab3e3aecc0352 --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-terminal/default.nix @@ -0,0 +1,51 @@ +{ lib, stdenv, fetchurl, pkg-config, libxml2, gnome, dconf, nautilus +, gtk3, gsettings-desktop-schemas, vte, gettext, which, libuuid, vala +, desktop-file-utils, itstool, wrapGAppsHook, pcre2 +, libxslt, docbook-xsl-nons }: + +stdenv.mkDerivation rec { + pname = "gnome-terminal"; + version = "3.40.1"; + + src = fetchurl { + url = "mirror://gnome/sources/gnome-terminal/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; + sha256 = "1r6qd6w18gk83w32y6bvn4hg2hd7qvngak4ymwpgndyp41rwqw07"; + }; + + buildInputs = [ + gtk3 gsettings-desktop-schemas vte libuuid dconf + # For extension + nautilus + ]; + + nativeBuildInputs = [ + pkg-config gettext itstool which libxml2 libxslt docbook-xsl-nons + vala desktop-file-utils wrapGAppsHook pcre2 + ]; + + # Silly ./configure, it looks for dbus file from gnome-shell in the + # installation tree of the package it is configuring. + postPatch = '' + substituteInPlace configure --replace '$(eval echo $(eval echo $(eval echo ''${dbusinterfacedir})))/org.gnome.ShellSearchProvider2.xml' "${gnome.gnome-shell}/share/dbus-1/interfaces/org.gnome.ShellSearchProvider2.xml" + substituteInPlace src/Makefile.in --replace '$(dbusinterfacedir)/org.gnome.ShellSearchProvider2.xml' "${gnome.gnome-shell}/share/dbus-1/interfaces/org.gnome.ShellSearchProvider2.xml" + ''; + + configureFlags = [ "--disable-migration" ]; # TODO: remove this with 3.30 + + passthru = { + updateScript = gnome.updateScript { + packageName = "gnome-terminal"; + attrPath = "gnome.gnome-terminal"; + }; + }; + + enableParallelBuilding = true; + + meta = with lib; { + description = "The GNOME Terminal Emulator"; + homepage = "https://wiki.gnome.org/Apps/Terminal"; + platforms = platforms.linux; + license = licenses.gpl3Plus; + maintainers = teams.gnome.members; + }; +} diff --git a/pkgs/desktops/gnome/core/gnome-themes-extra/default.nix b/pkgs/desktops/gnome/core/gnome-themes-extra/default.nix new file mode 100644 index 0000000000000..53f775833a8fd --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-themes-extra/default.nix @@ -0,0 +1,35 @@ +{ lib, stdenv, fetchurl, intltool, gtk3, gnome, librsvg, pkg-config, pango, atk, gtk2 +, gdk-pixbuf, hicolor-icon-theme }: + +let + pname = "gnome-themes-extra"; + version = "3.28"; +in stdenv.mkDerivation rec { + name = "${pname}-${version}"; + + src = fetchurl { + url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${name}.tar.xz"; + sha256 = "06aqg9asq2vqi9wr29bs4v8z2bf4manhbhfghf4nvw01y2zs0jvw"; + }; + + passthru = { + updateScript = gnome.updateScript { + packageName = pname; + }; + }; + + nativeBuildInputs = [ pkg-config intltool ]; + buildInputs = [ gtk3 librsvg pango atk gtk2 gdk-pixbuf ]; + propagatedBuildInputs = [ gnome.adwaita-icon-theme hicolor-icon-theme ]; + + dontDropIconThemeCache = true; + + postInstall = '' + gtk-update-icon-cache "$out"/share/icons/HighContrast + ''; + + meta = with lib; { + platforms = platforms.linux; + maintainers = teams.gnome.members; + }; +} diff --git a/pkgs/desktops/gnome/core/gnome-tour/default.nix b/pkgs/desktops/gnome/core/gnome-tour/default.nix new file mode 100644 index 0000000000000..7440749e0a9b9 --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-tour/default.nix @@ -0,0 +1,75 @@ +{ lib +, stdenv +, rustPlatform +, gettext +, meson +, ninja +, fetchurl +, pkg-config +, gtk3 +, glib +, gdk-pixbuf +, desktop-file-utils +, appstream-glib +, wrapGAppsHook +, python3 +, gnome +, libhandy +, librsvg +, rustc +, cargo +}: + +stdenv.mkDerivation rec { + pname = "gnome-tour"; + version = "40.0"; + + src = fetchurl { + url = "mirror://gnome/sources/${pname}/${lib.versions.major version}/${pname}-${version}.tar.xz"; + hash = "sha256-cGMiOGmgdHJ0FL7H23ONhQYhbuhMz8O8p9rFLkmMG/k="; + }; + + cargoVendorDir = "vendor"; + + nativeBuildInputs = [ + appstream-glib + cargo + desktop-file-utils + gettext + glib # glib-compile-resources + meson + ninja + pkg-config + python3 + rustPlatform.cargoSetupHook + rustc + wrapGAppsHook + ]; + + buildInputs = [ + gdk-pixbuf + glib + gtk3 + libhandy + librsvg + ]; + + postPatch = '' + chmod +x build-aux/meson_post_install.py + patchShebangs build-aux/meson_post_install.py + ''; + + passthru = { + updateScript = gnome.updateScript { + packageName = pname; + }; + }; + + meta = with lib; { + homepage = "https://gitlab.gnome.org/GNOME/gnome-tour"; + description = "GNOME Greeter & Tour"; + maintainers = teams.gnome.members; + license = licenses.gpl3Plus; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome/core/gnome-user-share/default.nix b/pkgs/desktops/gnome/core/gnome-user-share/default.nix new file mode 100644 index 0000000000000..211326cfcdbd1 --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-user-share/default.nix @@ -0,0 +1,96 @@ +{ lib, stdenv +, gettext +, meson +, ninja +, fetchurl +, fetchpatch +, apacheHttpd +, nautilus +, pkg-config +, gtk3 +, glib +, libxml2 +, systemd +, wrapGAppsHook +, itstool +, libnotify +, mod_dnssd +, gnome +, libcanberra-gtk3 +, python3 +}: + +stdenv.mkDerivation rec { + pname = "gnome-user-share"; + version = "3.34.0"; + + src = fetchurl { + url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; + sha256 = "04r9ck9v4i0d31grbli1d4slw2d6dcsfkpaybkwbzi7wnj72l30x"; + }; + + patches = [ + # fix gio-unix-2.0 lookup + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/gnome-user-share/commit/8772980d4732c15505b15dccff2ca3c97e96d49d.patch"; + sha256 = "03clzhrx72pq1cbmg2y24hvw4i1xsvrg9ip113fi5bc3w4gcji7p"; + }) + ]; + + postPatch = '' + chmod +x meson_post_install.py + patchShebangs meson_post_install.py + ''; + + preConfigure = '' + sed -e 's,^LoadModule dnssd_module.\+,LoadModule dnssd_module ${mod_dnssd}/modules/mod_dnssd.so,' \ + -e 's,''${HTTP_MODULES_PATH},${apacheHttpd}/modules,' \ + -i data/dav_user_2.4.conf + ''; + + mesonFlags = [ + "-Dhttpd=${apacheHttpd.out}/bin/httpd" + "-Dmodules_path=${apacheHttpd.dev}/modules" + "-Dsystemduserunitdir=${placeholder "out"}/etc/systemd/user" + # In 3.34.0 it defaults to false but it is silently ignored and always installed. + # Let’s add it anyway in case they decide to make build respect the option in the future. + "-Dnautilus_extension=true" + ]; + + nativeBuildInputs = [ + pkg-config + meson + ninja + gettext + itstool + libxml2 + wrapGAppsHook + python3 + ]; + + buildInputs = [ + gtk3 + glib + nautilus + libnotify + libcanberra-gtk3 + systemd + ]; + + doCheck = true; + + passthru = { + updateScript = gnome.updateScript { + packageName = pname; + attrPath = "gnome.${pname}"; + }; + }; + + meta = with lib; { + homepage = "https://help.gnome.org/users/gnome-user-share/3.8"; + description = "Service that exports the contents of the Public folder in your home directory on the local network"; + maintainers = teams.gnome.members; + license = licenses.gpl2; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome/core/gucharmap/default.nix b/pkgs/desktops/gnome/core/gucharmap/default.nix new file mode 100644 index 0000000000000..336a4d260c4ed --- /dev/null +++ b/pkgs/desktops/gnome/core/gucharmap/default.nix @@ -0,0 +1,108 @@ +{ lib, stdenv +, intltool +, fetchFromGitLab +, meson +, ninja +, pkg-config +, python3 +, gtk3 +, adwaita-icon-theme +, glib +, desktop-file-utils +, gtk-doc +, wrapGAppsHook +, gnome +, itstool +, libxml2 +, yelp-tools +, docbook_xsl +, docbook_xml_dtd_412 +, gsettings-desktop-schemas +, callPackage +, unzip +, unicode-character-database +, unihan-database +, runCommand +, symlinkJoin +, gobject-introspection +}: + +let + # TODO: make upstream patch allowing to use the uncompressed file, + # preferably from XDG_DATA_DIRS. + # https://gitlab.gnome.org/GNOME/gucharmap/issues/13 + unihanZip = runCommand "unihan" {} '' + mkdir -p $out/share/unicode + ln -s ${unihan-database.src} $out/share/unicode/Unihan.zip + ''; + ucd = symlinkJoin { + name = "ucd+unihan"; + paths = [ + unihanZip + unicode-character-database + ]; + }; +in stdenv.mkDerivation rec { + pname = "gucharmap"; + version = "13.0.2"; + + outputs = [ "out" "lib" "dev" "devdoc" ]; + + src = fetchFromGitLab { + domain = "gitlab.gnome.org"; + owner = "GNOME"; + repo = pname; + rev = version; + sha256 = "099za9mc6qdq9pwcbjp3d7hxjbaa43vk2w9qw4yiyswl1xq3jw62"; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + python3 + wrapGAppsHook + unzip + intltool + itstool + gtk-doc + docbook_xsl + docbook_xml_dtd_412 + yelp-tools + libxml2 + desktop-file-utils + gobject-introspection + ]; + + buildInputs = [ + gtk3 + glib + gsettings-desktop-schemas + adwaita-icon-theme + ]; + + mesonFlags = [ + "-Ducd_path=${ucd}/share/unicode" + "-Dvapi=false" + ]; + + doCheck = true; + + postPatch = '' + patchShebangs data/meson_desktopfile.py gucharmap/gen-guch-unicode-tables.pl gucharmap/meson_compileschemas.py + ''; + + passthru = { + updateScript = gnome.updateScript { + packageName = pname; + }; + }; + + meta = with lib; { + description = "GNOME Character Map, based on the Unicode Character Database"; + homepage = "https://wiki.gnome.org/Apps/Gucharmap"; + license = licenses.gpl3; + maintainers = teams.gnome.members; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome/core/libgnome-keyring/default.nix b/pkgs/desktops/gnome/core/libgnome-keyring/default.nix new file mode 100644 index 0000000000000..aa3c7ed398114 --- /dev/null +++ b/pkgs/desktops/gnome/core/libgnome-keyring/default.nix @@ -0,0 +1,32 @@ +{ lib, stdenv, fetchurl, glib, dbus, libgcrypt, pkg-config, intltool, gobject-introspection, gnome }: + +let + pname = "libgnome-keyring"; + version = "3.12.0"; +in +stdenv.mkDerivation rec { + name = "${pname}-${version}"; + + src = fetchurl { + url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${name}.tar.xz"; + sha256 = "c4c178fbb05f72acc484d22ddb0568f7532c409b0a13e06513ff54b91e947783"; + }; + + outputs = [ "out" "dev" ]; + + propagatedBuildInputs = [ glib gobject-introspection dbus libgcrypt ]; + nativeBuildInputs = [ pkg-config intltool ]; + + meta = { + description = "Framework for managing passwords and other secrets"; + homepage = "https://wiki.gnome.org/Projects/GnomeKeyring"; + license = with lib.licenses; [ gpl2Plus lgpl2Plus ]; + inherit (glib.meta) platforms maintainers; + + longDescription = '' + gnome-keyring is a program that keeps password and other secrets for + users. The library libgnome-keyring is used by applications to integrate + with the gnome-keyring system. + ''; + }; +} diff --git a/pkgs/desktops/gnome/core/mutter/3.34/0001-EGL-Include-EGL-eglmesaext.h.patch b/pkgs/desktops/gnome/core/mutter/3.34/0001-EGL-Include-EGL-eglmesaext.h.patch new file mode 100644 index 0000000000000..3691c034d1ee6 --- /dev/null +++ b/pkgs/desktops/gnome/core/mutter/3.34/0001-EGL-Include-EGL-eglmesaext.h.patch @@ -0,0 +1,74 @@ +From 7b94f980f2a099dd4b19b60c357cfcf5ff7ada6d Mon Sep 17 00:00:00 2001 +Message-Id: <7b94f980f2a099dd4b19b60c357cfcf5ff7ada6d.1601082838.git-series.worldofpeace@protonmail.ch> +From: WORLDofPEACE <worldofpeace@protonmail.ch> +Date: Sun, 20 Oct 2019 12:04:31 +0200 +Subject: [PATCH 1/7] EGL: Include EGL/eglmesaext.h + +From: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> + +The eglext.h shipped by libglvnd does not include the Mesa extensions, +unlike the header shipped in Mesa. + +Fixes https://gitlab.gnome.org/GNOME/mutter/issues/876 + +(cherry picked from commit a444a4c5f58ea516ad3cd9d6ddc0056c3ca9bc90) +--- + cogl/cogl/meson.build | 2 +- + src/backends/meta-egl-ext.h | 1 + + src/backends/meta-egl.c | 1 + + src/backends/meta-egl.h | 1 + + 4 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/cogl/cogl/meson.build b/cogl/cogl/meson.build +index 1057ef9..9a64294 100644 +--- a/cogl/cogl/meson.build ++++ b/cogl/cogl/meson.build +@@ -48,7 +48,7 @@ cogl_gl_header_h = configure_file( + built_headers += [cogl_gl_header_h] + + if have_egl +- cogl_egl_includes_string = '#include <EGL/egl.h>\n#include <EGL/eglext.h>' ++ cogl_egl_includes_string = '#include <EGL/egl.h>\n#include <EGL/eglext.h>\n#include <EGL/eglmesaext.h>' + else + cogl_egl_includes_string = '' + endif +diff --git a/src/backends/meta-egl-ext.h b/src/backends/meta-egl-ext.h +index 8705e7d..db0b74f 100644 +--- a/src/backends/meta-egl-ext.h ++++ b/src/backends/meta-egl-ext.h +@@ -29,6 +29,7 @@ + + #include <EGL/egl.h> + #include <EGL/eglext.h> ++#include <EGL/eglmesaext.h> + + /* + * This is a little different to the tests shipped with EGL implementations, +diff --git a/src/backends/meta-egl.c b/src/backends/meta-egl.c +index 6554be9..fdeff4f 100644 +--- a/src/backends/meta-egl.c ++++ b/src/backends/meta-egl.c +@@ -27,6 +27,7 @@ + + #include <EGL/egl.h> + #include <EGL/eglext.h> ++#include <EGL/eglmesaext.h> + #include <gio/gio.h> + #include <glib.h> + #include <glib-object.h> +diff --git a/src/backends/meta-egl.h b/src/backends/meta-egl.h +index f2a8164..4591e7d 100644 +--- a/src/backends/meta-egl.h ++++ b/src/backends/meta-egl.h +@@ -28,6 +28,7 @@ + + #include <EGL/egl.h> + #include <EGL/eglext.h> ++#include <EGL/eglmesaext.h> + #include <glib-object.h> + + #define META_EGL_ERROR meta_egl_error_quark () + +base-commit: 48ffbb582404c1d52196eb6cc5f082c31ca4910c +-- +git-series 0.9.1 diff --git a/pkgs/desktops/gnome/core/mutter/3.34/0002-drop-inheritable.patch b/pkgs/desktops/gnome/core/mutter/3.34/0002-drop-inheritable.patch new file mode 100644 index 0000000000000..28f89ac7c0c61 --- /dev/null +++ b/pkgs/desktops/gnome/core/mutter/3.34/0002-drop-inheritable.patch @@ -0,0 +1,135 @@ +From 14cee101882e65a57dcd66ea0f8399477b23ce7e Mon Sep 17 00:00:00 2001 +Message-Id: <14cee101882e65a57dcd66ea0f8399477b23ce7e.1601082838.git-series.worldofpeace@protonmail.ch> +In-Reply-To: <7b94f980f2a099dd4b19b60c357cfcf5ff7ada6d.1601082838.git-series.worldofpeace@protonmail.ch> +References: <7b94f980f2a099dd4b19b60c357cfcf5ff7ada6d.1601082838.git-series.worldofpeace@protonmail.ch> +From: WORLDofPEACE <worldofpeace@protonmail.ch> +Date: Sat, 19 Oct 2019 13:26:05 +0200 +Subject: [PATCH 2/7] drop inheritable + +From: Tor Hedin Brønner <torhedinbronner@gmail.com> + +Adapted from https://gitlab.gnome.org/GNOME/mutter/commit/c53c47ae123b03cc66044d2b846342123ecb3a01 + +We only want to drop inheritable though, to prevent the ambient set leaking further than gnome-shell. +--- + config.h.meson | 3 +++ + meson.build | 5 +++++ + meson_options.txt | 6 ++++++ + src/core/main.c | 10 ++++++++++ + src/meson.build | 1 + + 5 files changed, 25 insertions(+) + +diff --git a/config.h.meson b/config.h.meson +index 0bab718..202fb7e 100644 +--- a/config.h.meson ++++ b/config.h.meson +@@ -58,6 +58,9 @@ + /* Xwayland applications allowed to issue keyboard grabs */ + #mesondefine XWAYLAND_GRAB_DEFAULT_ACCESS_RULES + ++/* Defined if libcap-ng is available */ ++#mesondefine HAVE_LIBCAPNG ++ + /* XKB base prefix */ + #mesondefine XKB_BASE + +diff --git a/meson.build b/meson.build +index 29d495b..86970df 100644 +--- a/meson.build ++++ b/meson.build +@@ -35,6 +35,7 @@ libstartup_notification_req = '>= 0.7' + libcanberra_req = '>= 0.26' + libwacom_req = '>= 0.13' + atk_req = '>= 2.5.3' ++libcapng_req = '>= 0.7.9' + + # optional version requirements + udev_req = '>= 228' +@@ -125,6 +126,7 @@ xau_dep = dependency('xau') + ice_dep = dependency('ice') + atk_dep = dependency('atk', version: atk_req) + libcanberra_dep = dependency('libcanberra', version: libcanberra_req) ++libcapng_dep = dependency('libcap-ng', required: get_option('libcapng')) + + # For now always require X11 support + have_x11 = true +@@ -256,6 +258,7 @@ have_core_tests = false + have_cogl_tests = false + have_clutter_tests = false + have_installed_tests = false ++have_libcapng = libcapng_dep.found() + + if have_tests + have_core_tests = get_option('core_tests') +@@ -361,6 +364,7 @@ cdata.set('HAVE_LIBWACOM', have_libwacom) + cdata.set('HAVE_SM', have_sm) + cdata.set('HAVE_STARTUP_NOTIFICATION', have_startup_notification) + cdata.set('HAVE_INTROSPECTION', have_introspection) ++cdata.set('HAVE_LIBCAPNG', have_libcapng) + cdata.set('HAVE_PROFILER', have_profiler) + + xkb_base = xkeyboard_config_dep.get_pkgconfig_variable('xkb_base') +@@ -443,6 +447,7 @@ output = [ + ' Startup notification..... ' + have_startup_notification.to_string(), + ' Introspection............ ' + have_introspection.to_string(), + ' Profiler................. ' + have_profiler.to_string(), ++ ' libcap-ng................ ' + have_libcapng.to_string(), + '', + ' Tests:', + '', +diff --git a/meson_options.txt b/meson_options.txt +index 73aa7ad..8bfaacd 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -152,3 +152,9 @@ option('xwayland_grab_default_access_rules', + value: 'gnome-boxes,remote-viewer,virt-viewer,virt-manager,vinagre,vncviewer,Xephyr', + description: 'Comma delimited list of applications ressources or class allowed to issue X11 grabs in Xwayland' + ) ++ ++option('libcapng', ++ type: 'feature', ++ value: 'auto', ++ description: 'Enable libcap-ng support' ++) +diff --git a/src/core/main.c b/src/core/main.c +index 3935f35..ecf3cb2 100644 +--- a/src/core/main.c ++++ b/src/core/main.c +@@ -66,6 +66,10 @@ + #include <girepository.h> + #endif + ++#ifdef HAVE_LIBCAPNG ++#include <cap-ng.h> ++#endif ++ + #if defined(HAVE_NATIVE_BACKEND) && defined(HAVE_WAYLAND) + #include <systemd/sd-login.h> + #endif /* HAVE_WAYLAND && HAVE_NATIVE_BACKEND */ +@@ -673,6 +677,12 @@ meta_run (void) + if (!meta_display_open ()) + meta_exit (META_EXIT_ERROR); + ++#ifdef HAVE_LIBCAPNG ++ capng_clear(CAPNG_SELECT_BOTH); ++ capng_update(CAPNG_ADD, CAPNG_EFFECTIVE|CAPNG_PERMITTED, CAP_SYS_NICE); ++ capng_apply(CAPNG_SELECT_BOTH); ++#endif ++ + g_main_loop_run (meta_main_loop); + + meta_finalize (); +diff --git a/src/meson.build b/src/meson.build +index 90d8073..a9fffa2 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -18,6 +18,7 @@ mutter_pkg_deps = [ + glib_dep, + gsettings_desktop_schemas_dep, + gtk3_dep, ++ libcapng_dep, + pango_dep, + ] + +-- +git-series 0.9.1 diff --git a/pkgs/desktops/gnome/core/mutter/3.34/0003-Fix-glitches-in-gala.patch b/pkgs/desktops/gnome/core/mutter/3.34/0003-Fix-glitches-in-gala.patch new file mode 100644 index 0000000000000..9f78a324d9daf --- /dev/null +++ b/pkgs/desktops/gnome/core/mutter/3.34/0003-Fix-glitches-in-gala.patch @@ -0,0 +1,33 @@ +From 5d2b9a03f24b4dbc423adff52b2eeb478c4b5913 Mon Sep 17 00:00:00 2001 +Message-Id: <5d2b9a03f24b4dbc423adff52b2eeb478c4b5913.1601082838.git-series.worldofpeace@protonmail.ch> +In-Reply-To: <7b94f980f2a099dd4b19b60c357cfcf5ff7ada6d.1601082838.git-series.worldofpeace@protonmail.ch> +References: <7b94f980f2a099dd4b19b60c357cfcf5ff7ada6d.1601082838.git-series.worldofpeace@protonmail.ch> +From: WORLDofPEACE <worldofpeace@protonmail.ch> +Date: Sun, 5 Apr 2020 23:06:03 -0400 +Subject: [PATCH 3/7] Fix glitches in gala + +From: worldofpeace <worldofpeace@protonmail.ch> + +This fixes issues for users of mutter like in gala[0]. + +Upstream report: https://gitlab.gnome.org/GNOME/mutter/issues/536 +[0]: https://github.com/elementary/gala/issues/605 +--- + clutter/clutter/clutter-actor.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c +index ecf9a59..07b8b71 100644 +--- a/clutter/clutter/clutter-actor.c ++++ b/clutter/clutter/clutter-actor.c +@@ -17831,7 +17831,7 @@ _clutter_actor_get_paint_volume_mutable (ClutterActor *self) + if (_clutter_actor_get_paint_volume_real (self, &priv->paint_volume)) + { + priv->paint_volume_valid = TRUE; +- priv->needs_paint_volume_update = FALSE; ++ //priv->needs_paint_volume_update = FALSE; + return &priv->paint_volume; + } + else +-- +git-series 0.9.1 diff --git a/pkgs/desktops/gnome/core/mutter/3.34/0004-profiler-track-changes-in-GLib-and-Sysprof.patch b/pkgs/desktops/gnome/core/mutter/3.34/0004-profiler-track-changes-in-GLib-and-Sysprof.patch new file mode 100644 index 0000000000000..cd98d3950415b --- /dev/null +++ b/pkgs/desktops/gnome/core/mutter/3.34/0004-profiler-track-changes-in-GLib-and-Sysprof.patch @@ -0,0 +1,58 @@ +From 5a9f9fbaa1322b2ad0a52fcdd171d4f44d031918 Mon Sep 17 00:00:00 2001 +Message-Id: <5a9f9fbaa1322b2ad0a52fcdd171d4f44d031918.1601082838.git-series.worldofpeace@protonmail.ch> +In-Reply-To: <7b94f980f2a099dd4b19b60c357cfcf5ff7ada6d.1601082838.git-series.worldofpeace@protonmail.ch> +References: <7b94f980f2a099dd4b19b60c357cfcf5ff7ada6d.1601082838.git-series.worldofpeace@protonmail.ch> +From: WORLDofPEACE <worldofpeace@protonmail.ch> +Date: Wed, 30 Oct 2019 15:23:24 -0700 +Subject: [PATCH 4/7] profiler: track changes in GLib and Sysprof + +From: Christian Hergert <chergert@redhat.com> + +This tracks the changes to gdbus-codegen in terms of how GUnixFDList is +done to use the UnixFD annotation. + +https://gitlab.gnome.org/GNOME/mutter/merge_requests/908 +(cherry picked from commit 605171291993460f31d470a8143d6438d0c6169c) +--- + src/backends/meta-profiler.c | 7 ++----- + 1 file changed, 2 insertions(+), 5 deletions(-) + +diff --git a/src/backends/meta-profiler.c b/src/backends/meta-profiler.c +index 10d433a..0d62701 100644 +--- a/src/backends/meta-profiler.c ++++ b/src/backends/meta-profiler.c +@@ -51,13 +51,12 @@ G_DEFINE_TYPE_WITH_CODE (MetaProfiler, + static gboolean + handle_start (MetaDBusSysprof3Profiler *dbus_profiler, + GDBusMethodInvocation *invocation, ++ GUnixFDList *fd_list, + GVariant *options, + GVariant *fd_variant) + { + MetaProfiler *profiler = META_PROFILER (dbus_profiler); + GMainContext *main_context = g_main_context_default (); +- GDBusMessage *message; +- GUnixFDList *fd_list; + const char *group_name; + int position; + int fd = -1; +@@ -73,8 +72,6 @@ handle_start (MetaDBusSysprof3Profiler *dbus_profiler, + + g_variant_get (fd_variant, "h", &position); + +- message = g_dbus_method_invocation_get_message (invocation); +- fd_list = g_dbus_message_get_unix_fd_list (message); + if (fd_list) + fd = g_unix_fd_list_get (fd_list, position, NULL); + +@@ -98,7 +95,7 @@ handle_start (MetaDBusSysprof3Profiler *dbus_profiler, + + g_debug ("Profiler running"); + +- meta_dbus_sysprof3_profiler_complete_start (dbus_profiler, invocation); ++ meta_dbus_sysprof3_profiler_complete_start (dbus_profiler, invocation, NULL); + return TRUE; + } + +-- +git-series 0.9.1 diff --git a/pkgs/desktops/gnome/core/mutter/3.34/0005-meta-Add-missing-display.h-to-meta-workspace-manager.h.patch b/pkgs/desktops/gnome/core/mutter/3.34/0005-meta-Add-missing-display.h-to-meta-workspace-manager.h.patch new file mode 100644 index 0000000000000..138970ddda0ac --- /dev/null +++ b/pkgs/desktops/gnome/core/mutter/3.34/0005-meta-Add-missing-display.h-to-meta-workspace-manager.h.patch @@ -0,0 +1,32 @@ +From 2caa072dd8e283a8e43febeab55fe8b76dda69b7 Mon Sep 17 00:00:00 2001 +Message-Id: <2caa072dd8e283a8e43febeab55fe8b76dda69b7.1601082838.git-series.worldofpeace@protonmail.ch> +In-Reply-To: <7b94f980f2a099dd4b19b60c357cfcf5ff7ada6d.1601082838.git-series.worldofpeace@protonmail.ch> +References: <7b94f980f2a099dd4b19b60c357cfcf5ff7ada6d.1601082838.git-series.worldofpeace@protonmail.ch> +From: WORLDofPEACE <worldofpeace@protonmail.ch> +Date: Wed, 29 Jan 2020 11:02:33 +0100 +Subject: [PATCH 5/7] meta: Add missing display.h to meta-workspace-manager.h + +From: Corentin Noël <corentin@elementary.io> + +This is required because MetaDisplayCorner is only defined in display.h + +https://gitlab.gnome.org/GNOME/mutter/merge_requests/1025 +(cherry picked from commit 9d390ee49fb1f6300336e82ae94cc8061c6bae12) +--- + src/meta/meta-workspace-manager.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/meta/meta-workspace-manager.h b/src/meta/meta-workspace-manager.h +index 0390c44..92cd681 100644 +--- a/src/meta/meta-workspace-manager.h ++++ b/src/meta/meta-workspace-manager.h +@@ -26,6 +26,7 @@ + #include <glib-object.h> + + #include <meta/common.h> ++#include <meta/display.h> + #include <meta/prefs.h> + #include <meta/types.h> + +-- +git-series 0.9.1 diff --git a/pkgs/desktops/gnome/core/mutter/3.34/0006-build-bump-ABI-to-sysprof-capture-4.patch b/pkgs/desktops/gnome/core/mutter/3.34/0006-build-bump-ABI-to-sysprof-capture-4.patch new file mode 100644 index 0000000000000..6d88f0f5e7660 --- /dev/null +++ b/pkgs/desktops/gnome/core/mutter/3.34/0006-build-bump-ABI-to-sysprof-capture-4.patch @@ -0,0 +1,102 @@ +From 0c95e5a5b31eab93f149b90982680f38e8977063 Mon Sep 17 00:00:00 2001 +Message-Id: <0c95e5a5b31eab93f149b90982680f38e8977063.1601082838.git-series.worldofpeace@protonmail.ch> +In-Reply-To: <7b94f980f2a099dd4b19b60c357cfcf5ff7ada6d.1601082838.git-series.worldofpeace@protonmail.ch> +References: <7b94f980f2a099dd4b19b60c357cfcf5ff7ada6d.1601082838.git-series.worldofpeace@protonmail.ch> +From: WORLDofPEACE <worldofpeace@protonmail.ch> +Date: Sat, 4 Jul 2020 12:01:28 -0700 +Subject: [PATCH 6/7] build: bump ABI to sysprof-capture-4 + +From: Christian Hergert <chergert@redhat.com> + +GLib will now be linking against sysprof-capture-4.a. To support that, +sysprof had to remove the GLib dependency from sysprof-capture-4 which +had the side-effect of breaking ABi. + +This bumps the dependency and includes a fallback to compile just the +libsysprof-capture-4.a using a subproject wrap. + +https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1352 +(cherry picked from commit 2c08eb6d163b6758efec9eafe1d5c17fc1ab3692) +--- + meson.build | 20 ++++++++++++++++++-- + src/meson.build | 8 ++++++-- + subprojects/sysprof.wrap | 4 ++++ + 3 files changed, 28 insertions(+), 4 deletions(-) + create mode 100644 subprojects/sysprof.wrap + +diff --git a/meson.build b/meson.build +index 86970df..3dc0098 100644 +--- a/meson.build ++++ b/meson.build +@@ -1,6 +1,6 @@ + project('mutter', 'c', + version: '3.34.6', +- meson_version: '>= 0.50.0', ++ meson_version: '>= 0.51.0', + license: 'GPLv2+' + ) + +@@ -52,6 +52,9 @@ gbm_req = '>= 10.3' + # screen cast version requirements + libpipewire_req = '>= 0.2.5' + ++# profiler requirements ++sysprof_req = '>= 3.37.2' ++ + gnome = import('gnome') + pkg = import('pkgconfig') + i18n = import('i18n') +@@ -275,7 +278,20 @@ endif + + have_profiler = get_option('profiler') + if have_profiler +- sysprof_dep = dependency('sysprof-capture-3') ++ # libsysprof-capture support ++ sysprof_dep = dependency('sysprof-capture-4', ++ required: true, ++ default_options: [ ++ 'enable_examples=false', ++ 'enable_gtk=false', ++ 'enable_tests=false', ++ 'enable_tools=false', ++ 'libsysprof=false', ++ 'with_sysprofd=none', ++ 'help=false', ++ ], ++ fallback: ['sysprof', 'libsysprof_capture_dep'], ++ ) + endif + + required_functions = [ +diff --git a/src/meson.build b/src/meson.build +index a9fffa2..a91baa1 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -711,9 +711,13 @@ if have_profiler + 'backends/meta-profiler.h', + ] + +- dbus_interfaces_dir = join_paths(datadir, 'dbus-1', 'interfaces') +- sysprof3_dbus_file = join_paths(dbus_interfaces_dir, 'org.gnome.Sysprof3.Profiler.xml') ++ if sysprof_dep.type_name() == 'pkgconfig' ++ sysprof_dbus_interfaces_dir = join_paths(sysprof_dep.get_pkgconfig_variable('datadir'), 'dbus-1', 'interfaces') ++ else ++ sysprof_dbus_interfaces_dir = join_paths(meson.source_root(), 'subprojects', 'sysprof', 'src') ++ endif + ++ sysprof3_dbus_file = join_paths(sysprof_dbus_interfaces_dir, 'org.gnome.Sysprof3.Profiler.xml') + dbus_sysprof3_profiler_built_sources = gnome.gdbus_codegen('meta-dbus-sysprof3-profiler', + sysprof3_dbus_file, + interface_prefix: 'org.gnome.', +diff --git a/subprojects/sysprof.wrap b/subprojects/sysprof.wrap +new file mode 100644 +index 0000000..c8f5883 +--- /dev/null ++++ b/subprojects/sysprof.wrap +@@ -0,0 +1,4 @@ ++[wrap-git] ++directory=sysprof ++url=https://gitlab.gnome.org/GNOME/sysprof.git ++revision=cae28263ff5dd4a510d82f3dc2e3a3b3d9b386fb +-- +git-series 0.9.1 diff --git a/pkgs/desktops/gnome/core/mutter/3.34/0007-fix-paths.patch b/pkgs/desktops/gnome/core/mutter/3.34/0007-fix-paths.patch new file mode 100644 index 0000000000000..8376fc649b5f0 --- /dev/null +++ b/pkgs/desktops/gnome/core/mutter/3.34/0007-fix-paths.patch @@ -0,0 +1,27 @@ +From 7bbbf082599ec786f64f2135c9acc0b4fe2ecbf4 Mon Sep 17 00:00:00 2001 +Message-Id: <7bbbf082599ec786f64f2135c9acc0b4fe2ecbf4.1601082838.git-series.worldofpeace@protonmail.ch> +In-Reply-To: <7b94f980f2a099dd4b19b60c357cfcf5ff7ada6d.1601082838.git-series.worldofpeace@protonmail.ch> +References: <7b94f980f2a099dd4b19b60c357cfcf5ff7ada6d.1601082838.git-series.worldofpeace@protonmail.ch> +From: WORLDofPEACE <worldofpeace@protonmail.ch> +Date: Fri, 25 Sep 2020 20:48:33 -0400 +Subject: [PATCH 7/7] fix paths + +--- + src/core/util.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/core/util.c b/src/core/util.c +index 79bcfdc..87ce549 100644 +--- a/src/core/util.c ++++ b/src/core/util.c +@@ -623,7 +623,7 @@ meta_show_dialog (const char *type, + + args = g_ptr_array_new (); + +- append_argument (args, "zenity"); ++ append_argument (args, "@zenity@/bin/zenity"); + append_argument (args, type); + + if (display) +-- +git-series 0.9.1 diff --git a/pkgs/desktops/gnome/core/mutter/3.34/default.nix b/pkgs/desktops/gnome/core/mutter/3.34/default.nix new file mode 100644 index 0000000000000..42f07d45e62f5 --- /dev/null +++ b/pkgs/desktops/gnome/core/mutter/3.34/default.nix @@ -0,0 +1,134 @@ +{ fetchurl +, fetchpatch +, substituteAll +, lib, stdenv +, pkg-config +, gnome +, pantheon +, gettext +, gobject-introspection +, upower +, cairo +, pango +, cogl +, json-glib +, libstartup_notification +, zenity +, libcanberra-gtk3 +, ninja +, xkeyboard_config +, libxkbfile +, libxkbcommon +, libXtst +, libinput +, gsettings-desktop-schemas +, glib +, gtk3 +, gnome-desktop +, geocode-glib +, pipewire_0_2 +, libgudev +, libwacom +, xwayland +, meson +, gnome-settings-daemon +, xorgserver +, python3 +, wrapGAppsHook +, sysprof +, desktop-file-utils +, libcap_ng +, egl-wayland +}: + +stdenv.mkDerivation rec { + pname = "mutter"; + version = "3.34.6"; + + outputs = [ "out" "dev" "man" ]; + + src = fetchurl { + url = "mirror://gnome/sources/mutter/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; + hash = "sha256-I73ofTO4mBNYgxzsiRW7X/Hq+cHedMkM0WYLG5WINSY="; + }; + + mesonFlags = [ + "-Degl_device=true" + "-Dinstalled_tests=false" # TODO: enable these + "-Dwayland_eglstream=true" + ]; + + propagatedBuildInputs = [ + # required for pkg-config to detect mutter-clutter + json-glib + libXtst + libcap_ng + ]; + + nativeBuildInputs = [ + desktop-file-utils + gettext + meson + ninja + pkg-config + python3 + wrapGAppsHook + xorgserver # for cvt command + ]; + + buildInputs = [ + cairo + cogl + egl-wayland + geocode-glib + glib + gnome-desktop + gnome-settings-daemon + gobject-introspection + gsettings-desktop-schemas + gtk3 + libcanberra-gtk3 + libgudev + libinput + libstartup_notification + libwacom + libxkbcommon + libxkbfile + pango + pipewire_0_2 # TODO: backport pipewire 0.3 support + sysprof + upower + xkeyboard_config + xwayland + zenity + ]; + + patches = [ + ./0001-EGL-Include-EGL-eglmesaext.h.patch + ./0002-drop-inheritable.patch + ./0003-Fix-glitches-in-gala.patch + ./0004-profiler-track-changes-in-GLib-and-Sysprof.patch + ./0005-meta-Add-missing-display.h-to-meta-workspace-manager.h.patch + ./0006-build-bump-ABI-to-sysprof-capture-4.patch + (substituteAll { + src = ./0007-fix-paths.patch; + inherit zenity; + }) + ]; + + postPatch = '' + patchShebangs src/backends/native/gen-default-modes.py + ''; + + postInstall = '' + ${glib.dev}/bin/glib-compile-schemas "$out/share/glib-2.0/schemas" + ''; + + meta = with lib; { + description = "A window manager for GNOME"; + homepage = "https://gitlab.gnome.org/GNOME/mutter"; + license = licenses.gpl2; + maintainers = pantheon.maintainers; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome/core/mutter/default.nix b/pkgs/desktops/gnome/core/mutter/default.nix new file mode 100644 index 0000000000000..9f6a64ef1829b --- /dev/null +++ b/pkgs/desktops/gnome/core/mutter/default.nix @@ -0,0 +1,170 @@ +{ fetchurl +, fetchpatch +, substituteAll +, runCommand +, lib, stdenv +, pkg-config +, gnome +, gettext +, gobject-introspection +, cairo +, pango +, json-glib +, libstartup_notification +, zenity +, libcanberra +, ninja +, xkeyboard_config +, libxkbfile +, libXdamage +, libxkbcommon +, libXtst +, libinput +, libdrm +, gsettings-desktop-schemas +, glib +, gtk3 +, gnome-desktop +, pipewire +, libgudev +, libwacom +, xwayland +, mesa +, meson +, gnome-settings-daemon +, xorgserver +, python3 +, wrapGAppsHook +, sysprof +, desktop-file-utils +, libcap_ng +, egl-wayland +, graphene +, wayland-protocols +}: + +let self = stdenv.mkDerivation rec { + pname = "mutter"; + version = "40.0"; + + outputs = [ "out" "dev" "man" ]; + + src = fetchurl { + url = "mirror://gnome/sources/mutter/${lib.versions.major version}/${pname}-${version}.tar.xz"; + sha256 = "sha256-enGzEuWmZ8U3SJUYilBqP2tnF2i8s2K2jv3FYnc9GY4="; + }; + + 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; + }) + + # Fix non-deterministic build failure: + # https://gitlab.gnome.org/GNOME/mutter/-/issues/1682 + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/mutter/commit/91117bb052ed0d69c8ea4159c1df15c814d90627.patch"; + sha256 = "ek8hEoPP4S2TGOm6SGGOhUVIp4OT68nz0SQzZrceFUU="; + }) + ]; + + mesonFlags = [ + "-Degl_device=true" + "-Dinstalled_tests=false" # TODO: enable these + "-Dwayland_eglstream=true" + "-Dprofiler=true" + "-Dxwayland_path=${xwayland}/bin/Xwayland" + # This should be auto detected, but it looks like it manages a false + # positive. + "-Dxwayland_initfd=disabled" + ]; + + propagatedBuildInputs = [ + # required for pkg-config to detect mutter-clutter + json-glib + libXtst + libcap_ng + graphene + ]; + + nativeBuildInputs = [ + desktop-file-utils + gettext + mesa # needed for gbm + meson + ninja + pkg-config + python3 + wrapGAppsHook + xorgserver # for cvt command + ]; + + buildInputs = [ + cairo + egl-wayland + glib + gnome-desktop + gnome-settings-daemon + gobject-introspection + gsettings-desktop-schemas + gtk3 + libcanberra + libdrm + libgudev + libinput + libstartup_notification + libwacom + libxkbcommon + libxkbfile + libXdamage + pango + pipewire + sysprof + xkeyboard_config + xwayland + wayland-protocols + ]; + + postPatch = '' + patchShebangs src/backends/native/gen-default-modes.py + ''; + + postInstall = '' + ${glib.dev}/bin/glib-compile-schemas "$out/share/glib-2.0/schemas" + ''; + + # Install udev files into our own tree. + PKG_CONFIG_UDEV_UDEVDIR = "${placeholder "out"}/lib/udev"; + + passthru = { + libdir = "${self}/lib/mutter-7"; + + tests = { + libdirExists = runCommand "mutter-libdir-exists" {} '' + if [[ ! -d ${self.libdir} ]]; then + echo "passthru.libdir should contain a directory, “${self.libdir}” is not one." + exit 1 + fi + touch $out + ''; + }; + + updateScript = gnome.updateScript { + packageName = pname; + attrPath = "gnome.${pname}"; + }; + }; + + meta = with lib; { + description = "A window manager for GNOME"; + homepage = "https://gitlab.gnome.org/GNOME/mutter"; + license = licenses.gpl2Plus; + maintainers = teams.gnome.members; + platforms = platforms.linux; + }; +}; +in self diff --git a/pkgs/desktops/gnome/core/mutter/drop-inheritable.patch b/pkgs/desktops/gnome/core/mutter/drop-inheritable.patch new file mode 100644 index 0000000000000..7374e1b86935e --- /dev/null +++ b/pkgs/desktops/gnome/core/mutter/drop-inheritable.patch @@ -0,0 +1,132 @@ +From e9c772e265b2293af031c79f4bbc99b5847dfe3c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tor=20Hedin=20Br=C3=B8nner?= <torhedinbronner@gmail.com> +Date: Sat, 19 Oct 2019 13:26:05 +0200 +Subject: [PATCH] drop inheritable + +Adapted from https://gitlab.gnome.org/GNOME/mutter/commit/c53c47ae123b03cc66044d2b846342123ecb3a01 + +We only want to drop inheritable though, to prevent the ambient set leaking further than gnome-shell. + +--- + config.h.meson | 3 +++ + meson.build | 5 +++++ + meson_options.txt | 6 ++++++ + src/core/main.c | 11 +++++++++++ + src/meson.build | 1 + + 5 files changed, 26 insertions(+) + +diff --git a/config.h.meson b/config.h.meson +index 0bab71848..202fb7ed1 100644 +--- a/config.h.meson ++++ b/config.h.meson +@@ -58,6 +58,9 @@ + /* Xwayland applications allowed to issue keyboard grabs */ + #mesondefine XWAYLAND_GRAB_DEFAULT_ACCESS_RULES + ++/* Defined if libcap-ng is available */ ++#mesondefine HAVE_LIBCAPNG ++ + /* XKB base prefix */ + #mesondefine XKB_BASE + +diff --git a/meson.build b/meson.build +index 3322bd3b1..01c8020fa 100644 +--- a/meson.build ++++ b/meson.build +@@ -35,6 +35,7 @@ libstartup_notification_req = '>= 0.7' + libcanberra_req = '>= 0.26' + libwacom_req = '>= 0.13' + atk_req = '>= 2.5.3' ++libcapng_req = '>= 0.7.9' + + # optional version requirements + udev_req = '>= 228' +@@ -131,6 +131,7 @@ ice_dep = dependency('ice') + atk_dep = dependency('atk', version: atk_req) + libcanberra_dep = dependency('libcanberra', version: libcanberra_req) + dbus_dep = dependency('dbus-1') ++libcapng_dep = dependency('libcap-ng', required: get_option('libcapng')) + + # For now always require X11 support + have_x11 = true +@@ -256,6 +258,7 @@ have_core_tests = false + have_cogl_tests = false + have_clutter_tests = false + have_installed_tests = false ++have_libcapng = libcapng_dep.found() + + if have_tests + have_core_tests = get_option('core_tests') +@@ -361,6 +364,7 @@ cdata.set('HAVE_LIBWACOM', have_libwacom) + cdata.set('HAVE_SM', have_sm) + cdata.set('HAVE_STARTUP_NOTIFICATION', have_startup_notification) + cdata.set('HAVE_INTROSPECTION', have_introspection) ++cdata.set('HAVE_LIBCAPNG', have_libcapng) + cdata.set('HAVE_PROFILER', have_profiler) + + xkb_base = xkeyboard_config_dep.get_pkgconfig_variable('xkb_base') +@@ -465,6 +465,7 @@ output = [ + ' Introspection............ ' + have_introspection.to_string(), + ' Profiler................. ' + have_profiler.to_string(), + ' Xwayland initfd.......... ' + have_xwayland_initfd.to_string(), ++ ' libcap-ng................ ' + have_libcapng.to_string(), + '', + ' Tests:', + '', +diff --git a/meson_options.txt b/meson_options.txt +index 73aa7adde..8bfaacd9a 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -152,3 +152,9 @@ option('xwayland_grab_default_access_rules', + value: 'gnome-boxes,remote-viewer,virt-viewer,virt-manager,vinagre,vncviewer,Xephyr', + description: 'Comma delimited list of applications ressources or class allowed to issue X11 grabs in Xwayland' + ) ++ ++option('libcapng', ++ type: 'feature', ++ value: 'auto', ++ description: 'Enable libcap-ng support' ++) +diff --git a/src/core/main.c b/src/core/main.c +index 7f4f666d2..b27968f13 100644 +--- a/src/core/main.c ++++ b/src/core/main.c +@@ -66,6 +66,10 @@ + #include <girepository.h> + #endif + ++#ifdef HAVE_LIBCAPNG ++#include <cap-ng.h> ++#endif ++ + #if defined(HAVE_NATIVE_BACKEND) && defined(HAVE_WAYLAND) + #include <systemd/sd-login.h> + #endif /* HAVE_WAYLAND && HAVE_NATIVE_BACKEND */ +@@ -670,5 +674,12 @@ int + meta_run (void) + { + meta_start (); ++ ++#ifdef HAVE_LIBCAPNG ++ capng_clear(CAPNG_SELECT_BOTH); ++ capng_update(CAPNG_ADD, CAPNG_EFFECTIVE|CAPNG_PERMITTED, CAP_SYS_NICE); ++ capng_apply(CAPNG_SELECT_BOTH); ++#endif ++ + meta_run_main_loop (); + meta_finalize (); +diff --git a/src/meson.build b/src/meson.build +index 90d80734f..a9fffa2c2 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -18,6 +18,7 @@ mutter_pkg_deps = [ + glib_dep, + gsettings_desktop_schemas_dep, + gtk3_dep, ++ libcapng_dep, + pango_dep, + ] + +-- +2.23.0 + diff --git a/pkgs/desktops/gnome/core/mutter/fix-paths.patch b/pkgs/desktops/gnome/core/mutter/fix-paths.patch new file mode 100644 index 0000000000000..6ac0a431f61ff --- /dev/null +++ b/pkgs/desktops/gnome/core/mutter/fix-paths.patch @@ -0,0 +1,13 @@ +diff --git a/src/core/util.c b/src/core/util.c +index 57b73747d..f424cc81c 100644 +--- a/src/core/util.c ++++ b/src/core/util.c +@@ -636,7 +636,7 @@ meta_show_dialog (const char *type, + + args = g_ptr_array_new (); + +- append_argument (args, "zenity"); ++ append_argument (args, "@zenity@/bin/zenity"); + append_argument (args, type); + + if (display) diff --git a/pkgs/desktops/gnome/core/nautilus/default.nix b/pkgs/desktops/gnome/core/nautilus/default.nix new file mode 100644 index 0000000000000..f3ccdbce98cba --- /dev/null +++ b/pkgs/desktops/gnome/core/nautilus/default.nix @@ -0,0 +1,118 @@ +{ lib, stdenv +, fetchurl +, meson +, ninja +, pkg-config +, gettext +, libxml2 +, desktop-file-utils +, python3 +, wrapGAppsHook +, gtk3 +, libhandy +, libportal +, gnome +, gnome-autoar +, glib-networking +, shared-mime-info +, libnotify +, libexif +, libseccomp +, exempi +, librsvg +, tracker +, tracker-miners +, gexiv2 +, libselinux +, gdk-pixbuf +, substituteAll +, gnome-desktop +, gst_all_1 +, gsettings-desktop-schemas +, gobject-introspection +}: + +stdenv.mkDerivation rec { + pname = "nautilus"; + version = "40.1"; + + src = fetchurl { + url = "mirror://gnome/sources/${pname}/${lib.versions.major version}/${pname}-${version}.tar.xz"; + sha256 = "0cwxr7bfa19dvzra81s9wfshzv0zv7ycpfffn4amigd0fh0vkkwf"; + }; + + patches = [ + # Allow changing extension directory using environment variable. + ./extension_dir.patch + + # Hardcode required paths. + (substituteAll { + src = ./fix-paths.patch; + inherit tracker; + }) + ]; + + nativeBuildInputs = [ + desktop-file-utils + gettext + gobject-introspection + libxml2 + meson + ninja + pkg-config + python3 + wrapGAppsHook + ]; + + buildInputs = [ + exempi + gexiv2 + glib-networking + gnome-desktop + gnome.adwaita-icon-theme + gsettings-desktop-schemas + gst_all_1.gst-plugins-base + gtk3 + libhandy + libportal + libexif + libnotify + libseccomp + libselinux + shared-mime-info + tracker + tracker-miners + ]; + + propagatedBuildInputs = [ + gnome-autoar + ]; + + preFixup = '' + gappsWrapperArgs+=( + # Thumbnailers + --prefix XDG_DATA_DIRS : "${gdk-pixbuf}/share" + --prefix XDG_DATA_DIRS : "${librsvg}/share" + --prefix XDG_DATA_DIRS : "${shared-mime-info}/share" + ) + ''; + + postPatch = '' + patchShebangs build-aux/meson/postinstall.py + ''; + + passthru = { + updateScript = gnome.updateScript { + packageName = pname; + attrPath = "gnome.${pname}"; + }; + }; + + meta = with lib; { + description = "The file manager for GNOME"; + homepage = "https://wiki.gnome.org/Apps/Files"; + license = licenses.gpl3Plus; + platforms = platforms.linux; + maintainers = teams.gnome.members; + }; +} diff --git a/pkgs/desktops/gnome/core/nautilus/extension_dir.patch b/pkgs/desktops/gnome/core/nautilus/extension_dir.patch new file mode 100644 index 0000000000000..e1313999675d0 --- /dev/null +++ b/pkgs/desktops/gnome/core/nautilus/extension_dir.patch @@ -0,0 +1,24 @@ +diff --git a/src/nautilus-module.c b/src/nautilus-module.c +index 6273a76..4adcc8a 100644 +--- a/src/nautilus-module.c ++++ b/src/nautilus-module.c +@@ -242,11 +242,17 @@ void + nautilus_module_setup (void) + { + static gboolean initialized = FALSE; ++ const gchar* extensiondir = NULL; + + if (!initialized) + { + initialized = TRUE; + +- load_module_dir (NAUTILUS_EXTENSIONDIR); ++ extensiondir = g_getenv ("NAUTILUS_EXTENSION_DIR"); ++ if (extensiondir == NULL) { ++ extensiondir = NAUTILUS_EXTENSIONDIR; ++ } ++ ++ load_module_dir (extensiondir); + + eel_debug_call_at_shutdown (free_module_objects); + } diff --git a/pkgs/desktops/gnome/core/nautilus/fix-paths.patch b/pkgs/desktops/gnome/core/nautilus/fix-paths.patch new file mode 100644 index 0000000000000..dc9874359b233 --- /dev/null +++ b/pkgs/desktops/gnome/core/nautilus/fix-paths.patch @@ -0,0 +1,13 @@ +diff --git a/src/nautilus-tag-manager.c b/src/nautilus-tag-manager.c +index 28b96c996..0b1fad9ab 100644 +--- a/src/nautilus-tag-manager.c ++++ b/src/nautilus-tag-manager.c +@@ -962,7 +962,7 @@ child_watch_cb (GPid pid, + static void + export_tracker2_data (NautilusTagManager *self) + { +- gchar *argv[] = {"tracker3", "export", "--2to3", "files-starred", "--keyfile", NULL}; ++ gchar *argv[] = {"@tracker@/bin/tracker3", "export", "--2to3", "files-starred", "--keyfile", NULL}; + gint stdout_fd; + GPid child_pid; + g_autoptr (GError) error = NULL; diff --git a/pkgs/desktops/gnome/core/rygel/add-option-for-installation-sysconfdir.patch b/pkgs/desktops/gnome/core/rygel/add-option-for-installation-sysconfdir.patch new file mode 100644 index 0000000000000..6fe651b9cbb47 --- /dev/null +++ b/pkgs/desktops/gnome/core/rygel/add-option-for-installation-sysconfdir.patch @@ -0,0 +1,38 @@ +diff --git a/meson.build b/meson.build +index 4aa683d6..a930d533 100644 +--- a/meson.build ++++ b/meson.build +@@ -20,7 +20,11 @@ if not get_option('uninstalled') + rygel_datadir = join_paths(get_option('prefix'), get_option('datadir'), 'rygel') + rygel_libexecdir = join_paths(get_option('prefix'), get_option('libexecdir'), + 'rygel') +- rygel_sysconfdir = join_paths(get_option('prefix'), get_option('sysconfdir')) ++ if get_option('sysconfdir_install') != '' ++ rygel_sysconfdir = join_paths(get_option('prefix'), get_option('sysconfdir_install')) ++ else ++ rygel_sysconfdir = join_paths(get_option('prefix'), get_option('sysconfdir')) ++ endif + rygel_plugindir = join_paths(rygel_libdir, 'rygel-2.6', 'plugins') + rygel_enginedir = join_paths(rygel_libdir, 'rygel-2.6', 'engines') + rygel_presetdir = join_paths(rygel_datadir, 'presets') +@@ -55,7 +59,7 @@ conf.set_quoted('DATA_DIR', rygel_datadir) + conf.set_quoted('PLUGIN_DIR', rygel_plugindir) + conf.set_quoted('BIG_ICON_DIR', rygel_bigicondir) + conf.set_quoted('SMALL_ICON_DIR', rygel_smallicondir) +-conf.set_quoted('SYS_CONFIG_DIR', rygel_sysconfdir) ++conf.set_quoted('SYS_CONFIG_DIR', get_option('sysconfdir')) + conf.set_quoted('LOCALEDIR', join_paths(get_option('prefix'), get_option('localedir'))) + conf.set_quoted('MX_EXTRACT_PATH', join_paths(rygel_libexecdir, 'mx-extract')) + conf.set_quoted('DESKTOP_DIR', join_paths(get_option('prefix'), get_option('datadir'), 'applications')) +diff --git a/meson_options.txt b/meson_options.txt +index cb604c4e..1b049b77 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -1,6 +1,7 @@ + option('uninstalled', type: 'boolean', value: 'false', description: 'Run Rygel from build directory only') + option('api-docs', type: 'boolean', value: 'false', description: 'Build the API documentation') + option('systemd-user-units-dir', type : 'string', value : 'auto', description : 'Where to install the systemd user unit (use special values "auto" or "none", or pass a path') ++option('sysconfdir_install', type: 'string', value: '', description: 'sysconfdir to use during installation') + option('plugins', type : 'array', choices : ['external', 'gst-launch', 'lms', 'media-export', 'mpris', 'playbin', 'ruih', 'tracker', 'tracker3']) + option('engines', type : 'array', choices : ['simple', 'gstreamer']) + option('examples', type : 'boolean', value : 'true') diff --git a/pkgs/desktops/gnome/core/rygel/default.nix b/pkgs/desktops/gnome/core/rygel/default.nix new file mode 100644 index 0000000000000..f43df23f44a1d --- /dev/null +++ b/pkgs/desktops/gnome/core/rygel/default.nix @@ -0,0 +1,110 @@ +{ lib, stdenv +, fetchurl +, meson +, ninja +, pkg-config +, vala +, gettext +, libxml2 +, gobject-introspection +, wrapGAppsHook +, python3 +, glib +, gssdp +, gupnp +, gupnp-av +, gupnp-dlna +, gst_all_1 +, libgee +, libsoup +, gtk3 +, libmediaart +, sqlite +, systemd +, tracker +, shared-mime-info +, gnome +}: + +stdenv.mkDerivation rec { + pname = "rygel"; + version = "0.40.1"; + + # TODO: split out lib + outputs = [ "out" "dev" ]; + + src = fetchurl { + url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; + sha256 = "QkDXd1mcjNCeZ9pEzLOV0KbceEedgJzWIZgixbVooy0="; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + vala + gettext + libxml2 + gobject-introspection + wrapGAppsHook + python3 + ]; + + buildInputs = [ + glib + gssdp + gupnp + gupnp-av + gupnp-dlna + libgee + libsoup + gtk3 + libmediaart + sqlite + systemd + tracker + shared-mime-info + ] ++ (with gst_all_1; [ + gstreamer + gst-editing-services + gst-plugins-base + gst-plugins-good + gst-plugins-bad + gst-plugins-ugly + ]); + + mesonFlags = [ + "-Dsystemd-user-units-dir=${placeholder "out"}/lib/systemd/user" + "-Dapi-docs=false" + "--sysconfdir=/etc" + "-Dsysconfdir_install=${placeholder "out"}/etc" + # Build all plug-ins except for tracker 2 + "-Dplugins=external,gst-launch,lms,media-export,mpris,playbin,ruih,tracker3" + ]; + + doCheck = true; + + patches = [ + ./add-option-for-installation-sysconfdir.patch + ]; + + postPatch = '' + patchShebangs data/xml/process-xml.py + ''; + + passthru = { + updateScript = gnome.updateScript { + packageName = pname; + attrPath = "gnome.${pname}"; + versionPolicy = "odd-unstable"; + }; + }; + + meta = with lib; { + description = "A home media solution (UPnP AV MediaServer) that allows you to easily share audio, video and pictures to other devices"; + homepage = "https://wiki.gnome.org/Projects/Rygel"; + license = licenses.lgpl21Plus; + maintainers = teams.gnome.members; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome/core/simple-scan/default.nix b/pkgs/desktops/gnome/core/simple-scan/default.nix new file mode 100644 index 0000000000000..91ac4f14b22af --- /dev/null +++ b/pkgs/desktops/gnome/core/simple-scan/default.nix @@ -0,0 +1,89 @@ +{ lib, stdenv +, fetchurl +, meson +, ninja +, pkg-config +, gettext +, itstool +, python3 +, wrapGAppsHook +, cairo +, gdk-pixbuf +, colord +, glib +, gtk3 +, gusb +, packagekit +, libhandy +, libwebp +, libxml2 +, sane-backends +, vala +, gnome +, gobject-introspection +}: + +stdenv.mkDerivation rec { + pname = "simple-scan"; + version = "40.0"; + + src = fetchurl { + url = "mirror://gnome/sources/${pname}/${lib.versions.major version}/${pname}-${version}.tar.xz"; + sha256 = "sha256-E4EbsqhhnmOkP8Lva3E1ny1cQITG1cizqtYXJLIHUa8="; + }; + + nativeBuildInputs = [ + meson + ninja + gettext + itstool + pkg-config + python3 + wrapGAppsHook + libxml2 + gobject-introspection # For setup hook + ]; + + buildInputs = [ + cairo + gdk-pixbuf + colord + glib + gnome.adwaita-icon-theme + gusb + gtk3 + libhandy + libwebp + packagekit + sane-backends + vala + ]; + + postPatch = '' + patchShebangs data/meson_compile_gschema.py + ''; + + doCheck = true; + + passthru = { + updateScript = gnome.updateScript { + packageName = "simple-scan"; + }; + }; + + meta = with lib; { + description = "Simple scanning utility"; + longDescription = '' + A really easy way to scan both documents and photos. You can crop out the + bad parts of a photo and rotate it if it is the wrong way round. You can + print your scans, export them to pdf, or save them in a range of image + formats. Basically a frontend for SANE - which is the same backend as + XSANE uses. This means that all existing scanners will work and the + interface is well tested. + ''; + homepage = "https://gitlab.gnome.org/GNOME/simple-scan"; + license = licenses.gpl3Plus; + maintainers = teams.gnome.members; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome/core/sushi/default.nix b/pkgs/desktops/gnome/core/sushi/default.nix new file mode 100644 index 0000000000000..c42b6964bf65f --- /dev/null +++ b/pkgs/desktops/gnome/core/sushi/default.nix @@ -0,0 +1,83 @@ +{ lib, stdenv +, fetchurl +, pkg-config +, meson +, gettext +, gobject-introspection +, glib +, gnome +, gtksourceview4 +, gjs +, webkitgtk +, libmusicbrainz5 +, icu +, wrapGAppsHook +, gst_all_1 +, gdk-pixbuf +, librsvg +, gtk3 +, harfbuzz +, ninja +, epoxy +}: + +stdenv.mkDerivation rec { + pname = "sushi"; + version = "3.38.0"; + + src = fetchurl { + url = "mirror://gnome/sources/sushi/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; + sha256 = "0vlqqk916dymv4asbyvalp1m096a5hh99nx23i4xavzvgygh4h2h"; + }; + + nativeBuildInputs = [ + pkg-config + meson + ninja + gettext + gobject-introspection + wrapGAppsHook + ]; + + buildInputs = [ + glib + gtk3 + gnome.evince + icu + harfbuzz + gjs + gtksourceview4 + gdk-pixbuf + librsvg + libmusicbrainz5 + webkitgtk + epoxy + gst_all_1.gstreamer + gst_all_1.gst-plugins-base + gst_all_1.gst-plugins-good + ]; + + # See https://github.com/NixOS/nixpkgs/issues/31168 + postInstall = '' + for file in $out/libexec/org.gnome.NautilusPreviewer + do + sed -e $"2iimports.package._findEffectiveEntryPointName = () => \'$(basename $file)\' " \ + -i $file + done + ''; + + passthru = { + updateScript = gnome.updateScript { + packageName = "sushi"; + attrPath = "gnome.sushi"; + }; + }; + + meta = with lib; { + homepage = "https://en.wikipedia.org/wiki/Sushi_(software)"; + description = "A quick previewer for Nautilus"; + maintainers = teams.gnome.members; + license = licenses.gpl2Plus; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome/core/totem/default.nix b/pkgs/desktops/gnome/core/totem/default.nix new file mode 100644 index 0000000000000..f7541fe12edf2 --- /dev/null +++ b/pkgs/desktops/gnome/core/totem/default.nix @@ -0,0 +1,123 @@ +{ lib, stdenv +, fetchurl +, meson +, ninja +, gettext +, gst_all_1 +, clutter-gtk +, clutter-gst +, python3Packages +, shared-mime-info +, pkg-config +, gtk3 +, glib +, gobject-introspection +, totem-pl-parser +, wrapGAppsHook +, itstool +, libxml2 +, vala +, gnome +, grilo +, grilo-plugins +, libpeas +, adwaita-icon-theme +, gnome-desktop +, gsettings-desktop-schemas +, gdk-pixbuf +, xvfb_run +}: + +stdenv.mkDerivation rec { + pname = "totem"; + version = "3.38.0"; + + src = fetchurl { + url = "mirror://gnome/sources/totem/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; + sha256 = "0bs33ijvxbr2prb9yj4dxglsszslsn9k258n311sld84masz4ad8"; + }; + + nativeBuildInputs = [ + meson + ninja + vala + pkg-config + gettext + python3Packages.python + itstool + gobject-introspection + wrapGAppsHook + ]; + + buildInputs = [ + gtk3 + glib + grilo + clutter-gtk + clutter-gst + totem-pl-parser + grilo-plugins + gst_all_1.gstreamer + gst_all_1.gst-plugins-base + gst_all_1.gst-plugins-good + gst_all_1.gst-plugins-bad + gst_all_1.gst-plugins-ugly + gst_all_1.gst-libav + libpeas + shared-mime-info + gdk-pixbuf + libxml2 + adwaita-icon-theme + gnome-desktop + gsettings-desktop-schemas + # for plug-ins + python3Packages.pygobject3 + python3Packages.dbus-python + ]; + + checkInputs = [ + xvfb_run + ]; + + mesonFlags = [ + # TODO: https://github.com/NixOS/nixpkgs/issues/36468 + "-Dc_args=-I${glib.dev}/include/gio-unix-2.0" + ]; + + # Tests do not work with GStreamer 1.18. + # https://gitlab.gnome.org/GNOME/totem/-/issues/450 + doCheck = false; + + postPatch = '' + chmod +x meson_compile_python.py meson_post_install.py # patchShebangs requires executable file + patchShebangs \ + ./meson_compile_python.py \ + ./meson_post_install.py + ''; + + checkPhase = '' + runHook preCheck + + xvfb-run -s '-screen 0 800x600x24' \ + ninja test + + runHook postCheck + ''; + + wrapPrefixVariables = [ "PYTHONPATH" ]; + + passthru = { + updateScript = gnome.updateScript { + packageName = "totem"; + attrPath = "gnome.totem"; + }; + }; + + meta = with lib; { + homepage = "https://wiki.gnome.org/Apps/Videos"; + description = "Movie player for the GNOME desktop based on GStreamer"; + maintainers = teams.gnome.members; + license = licenses.gpl2Plus; # with exception to allow use of non-GPL compatible plug-ins + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome/core/yelp-xsl/default.nix b/pkgs/desktops/gnome/core/yelp-xsl/default.nix new file mode 100644 index 0000000000000..7c9b4eb839c03 --- /dev/null +++ b/pkgs/desktops/gnome/core/yelp-xsl/default.nix @@ -0,0 +1,52 @@ +{ lib, stdenv +, gettext +, fetchurl +, pkg-config +, itstool +, libxml2 +, libxslt +, gnome +}: + +stdenv.mkDerivation rec { + pname = "yelp-xsl"; + version = "40.0"; + + src = fetchurl { + url = "mirror://gnome/sources/yelp-xsl/${lib.versions.major version}/${pname}-${version}.tar.xz"; + sha256 = "sha256-Nh7NTTP8zbO7CKaH9g5cPpCdLp47Ai2ETgSYINDPYrA="; + }; + + nativeBuildInputs = [ + pkg-config + gettext + itstool + libxml2 + libxslt + ]; + + doCheck = true; + + passthru = { + updateScript = gnome.updateScript { + packageName = pname; + attrPath = "gnome.${pname}"; + }; + }; + + meta = with lib; { + homepage = "https://wiki.gnome.org/Apps/Yelp"; + description = "Yelp's universal stylesheets for Mallard and DocBook"; + maintainers = teams.gnome.members; + license = with licenses; [ + # See https://gitlab.gnome.org/GNOME/yelp-xsl/blob/master/COPYING + # Stylesheets + lgpl2Plus + # Icons, unclear: https://gitlab.gnome.org/GNOME/yelp-xsl/issues/25 + gpl2 + # highlight.js + bsd3 + ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/desktops/gnome/core/yelp/default.nix b/pkgs/desktops/gnome/core/yelp/default.nix new file mode 100644 index 0000000000000..f4df80f5611f3 --- /dev/null +++ b/pkgs/desktops/gnome/core/yelp/default.nix @@ -0,0 +1,36 @@ +{ lib, stdenv, gettext, fetchurl, webkitgtk, pkg-config, gtk3, glib +, gnome, sqlite +, itstool, libxml2, libxslt, gst_all_1 +, wrapGAppsHook }: + +stdenv.mkDerivation rec { + pname = "yelp"; + version = "40.0"; + + src = fetchurl { + url = "mirror://gnome/sources/yelp/${lib.versions.major version}/${pname}-${version}.tar.xz"; + sha256 = "sha256-B3dfoGzSg2Xs2Cm7FqhaaCiXqyHYzONFlrvvXNRVquA="; + }; + + nativeBuildInputs = [ pkg-config gettext itstool wrapGAppsHook ]; + buildInputs = [ + gtk3 glib webkitgtk sqlite + libxml2 libxslt gnome.yelp-xsl + gnome.adwaita-icon-theme + gst_all_1.gst-plugins-base gst_all_1.gst-plugins-good + ]; + + passthru = { + updateScript = gnome.updateScript { + packageName = "yelp"; + }; + }; + + meta = with lib; { + homepage = "https://wiki.gnome.org/Apps/Yelp"; + description = "The help viewer in Gnome"; + maintainers = teams.gnome.members; + license = licenses.gpl2; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome/core/zenity/default.nix b/pkgs/desktops/gnome/core/zenity/default.nix new file mode 100644 index 0000000000000..51ad81a77a469 --- /dev/null +++ b/pkgs/desktops/gnome/core/zenity/default.nix @@ -0,0 +1,50 @@ +{ lib, stdenv +, fetchurl +, pkg-config +, libxml2 +, gnome +, gtk3 +, yelp-tools +, gettext +, libX11 +, itstool +, wrapGAppsHook +}: + +stdenv.mkDerivation rec { + pname = "zenity"; + version = "3.32.0"; + + src = fetchurl { + url = "mirror://gnome/sources/zenity/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; + sha256 = "15fdh8xfdhnwcynyh4byx3mrjxbyprqnwxzi7qn3g5wwaqryg1p7"; + }; + + nativeBuildInputs = [ + pkg-config + gettext + yelp-tools + itstool + libxml2 + wrapGAppsHook + ]; + + buildInputs = [ + gtk3 + libX11 + ]; + + passthru = { + updateScript = gnome.updateScript { + packageName = "zenity"; + attrPath = "gnome.zenity"; + }; + }; + + meta = with lib; { + description = "Tool to display dialogs from the commandline and shell scripts"; + homepage = "https://wiki.gnome.org/Projects/Zenity"; + platforms = platforms.linux; + maintainers = teams.gnome.members; + }; +} |