summary refs log tree commit diff
path: root/pkgs/desktops/gnome-3/misc
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/desktops/gnome-3/misc')
-rw-r--r--pkgs/desktops/gnome-3/misc/gnome-applets/default.nix110
-rw-r--r--pkgs/desktops/gnome-3/misc/gnome-flashback/default.nix92
-rw-r--r--pkgs/desktops/gnome-3/misc/gnome-flashback/fix-paths.patch30
-rw-r--r--pkgs/desktops/gnome-3/misc/gnome-panel/default.nix92
-rw-r--r--pkgs/desktops/gnome-3/misc/gpaste/default.nix16
-rw-r--r--pkgs/desktops/gnome-3/misc/gpaste/fix-paths.patch55
-rw-r--r--pkgs/desktops/gnome-3/misc/libgnome-games-support/default.nix6
-rw-r--r--pkgs/desktops/gnome-3/misc/metacity/default.nix70
-rw-r--r--pkgs/desktops/gnome-3/misc/metacity/fix-paths.patch11
9 files changed, 481 insertions, 1 deletions
diff --git a/pkgs/desktops/gnome-3/misc/gnome-applets/default.nix b/pkgs/desktops/gnome-3/misc/gnome-applets/default.nix
new file mode 100644
index 000000000000..cbf8bc9707bf
--- /dev/null
+++ b/pkgs/desktops/gnome-3/misc/gnome-applets/default.nix
@@ -0,0 +1,110 @@
+{ stdenv
+, fetchurl
+, fetchpatch
+, autoreconfHook
+, intltool
+, itstool
+, libxml2
+, libxslt
+, pkgconfig
+, gnome-panel
+, gtk3
+, glib
+, libwnck3
+, libgtop
+, libnotify
+, upower
+, dbus-glib
+, wirelesstools
+, linuxPackages
+, adwaita-icon-theme
+, libgweather
+, gucharmap
+, gnome-settings-daemon
+, tracker
+, polkit
+, gnome3
+}:
+
+let
+  pname = "gnome-applets";
+  version = "3.28.0";
+in stdenv.mkDerivation rec {
+  name = "${pname}-${version}";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
+    sha256 = "0wd6pirv57rcxm5d32r1s3ni7sp26gnqd4qhjciw0pn5ak627y5h";
+  };
+
+  patches = [
+    # https://github.com/NixOS/nixpkgs/issues/36468
+    # https://gitlab.gnome.org/GNOME/gnome-applets/issues/3
+    (fetchpatch {
+      url = https://gitlab.gnome.org/GNOME/gnome-applets/commit/1ee719581c33d7d640ae9f656e4e9b192bafef78.patch;
+      sha256 = "05wim7d2ii3pxph3n3am76cvnxmkfpggk0cpy8p5xgm3hcibwfrf";
+    })
+    (fetchpatch {
+      url = https://gitlab.gnome.org/GNOME/gnome-applets/commit/1fa778b01f0e6b70678b0e5755ca0ed7a093fa75.patch;
+      sha256 = "0kppqywn0ab18p64ixz0b58cn5bpqf0xy71bycldlc5ybpdx5mq0";
+    })
+
+    # https://gitlab.gnome.org/GNOME/gnome-applets/issues/4
+    (fetchpatch {
+      url = https://gitlab.gnome.org/GNOME/gnome-applets/commit/e14482a90e6113f211e9328d8c39a69bdf5111d8.patch;
+      sha256 = "10ac0kk38hxqh8yvdlriyyv809qrxbpy9ihp01gizhiw7qpz97ff";
+    })
+  ];
+
+  nativeBuildInputs = [
+    autoreconfHook
+    intltool
+    itstool
+    pkgconfig
+    libxml2
+    libxslt
+  ];
+
+  buildInputs = [
+    gnome-panel
+    gtk3
+    glib
+    libxml2
+    libwnck3
+    libgtop
+    libnotify
+    upower
+    dbus-glib
+    adwaita-icon-theme
+    libgweather
+    gucharmap
+    gnome-settings-daemon
+    tracker
+    polkit
+    wirelesstools
+    linuxPackages.cpupower
+  ];
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  configureFlags = [
+    "--with-libpanel-applet-dir=$(out)/share/gnome-panel/applets"
+  ];
+
+  passthru = {
+    updateScript = gnome3.updateScript {
+      packageName = pname;
+      attrPath = "gnome3.${pname}";
+    };
+  };
+
+  meta = with stdenv.lib; {
+    description = "Applets for use with the GNOME panel";
+    homepage = https://wiki.gnome.org/Projects/GnomeApplets;
+    license = licenses.gpl2Plus;
+    maintainers = gnome3.maintainers;
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/desktops/gnome-3/misc/gnome-flashback/default.nix b/pkgs/desktops/gnome-3/misc/gnome-flashback/default.nix
new file mode 100644
index 000000000000..f3f2cf992571
--- /dev/null
+++ b/pkgs/desktops/gnome-3/misc/gnome-flashback/default.nix
@@ -0,0 +1,92 @@
+{ stdenv
+, autoreconfHook
+, fetchurl
+, fetchpatch
+, gettext
+, glib
+, gnome-bluetooth
+, gnome-desktop
+, gnome-session
+, gnome3
+, gsettings-desktop-schemas
+, gtk
+, ibus
+, intltool
+, libcanberra-gtk3
+, libpulseaudio
+, libxkbfile
+, libxml2
+, metacity
+, pkgconfig
+, polkit
+, substituteAll
+, upower
+, xkeyboard_config }:
+
+let
+  pname = "gnome-flashback";
+  version = "3.28.0";
+in stdenv.mkDerivation rec {
+  name = "${pname}-${version}";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
+    sha256 = "1ra8bfwgwqw47zx2h1q999g7l4dnqh7sv02if3zk8pkw3sm769hg";
+  };
+
+  patches =[
+    (substituteAll {
+      src = ./fix-paths.patch;
+      inherit metacity;
+      gnomeSession = gnome-session;
+    })
+
+    # https://github.com/NixOS/nixpkgs/issues/36468
+    # https://gitlab.gnome.org/GNOME/gnome-flashback/issues/3
+    (fetchpatch {
+      url = https://gitlab.gnome.org/GNOME/gnome-flashback/commit/eabd34f64adc43b8783920bd7a2177ce21f83fbc.patch;
+      sha256 = "116c5zy8cp7d06mrsn943q7vj166086jzrfzfqg7yli14pmf9w1a";
+    })
+  ];
+
+  nativeBuildInputs = [
+    autoreconfHook
+    gettext
+    libxml2
+    pkgconfig
+  ];
+
+  buildInputs = [
+    glib
+    gnome-bluetooth
+    gnome-desktop
+    gsettings-desktop-schemas
+    gtk
+    ibus
+    libcanberra-gtk3
+    libpulseaudio
+    libxkbfile
+    polkit
+    upower
+    xkeyboard_config
+  ];
+
+  doCheck = true;
+
+  enableParallelBuilding = true;
+
+  passthru = {
+    updateScript = gnome3.updateScript {
+      packageName = pname;
+      attrPath = "gnome3.${pname}";
+    };
+  };
+
+  meta = with stdenv.lib; {
+    description = "GNOME 2.x-like session for GNOME 3";
+    homepage = https://wiki.gnome.org/Projects/GnomeFlashback;
+    license = licenses.gpl2;
+    maintainers = gnome3.maintainers;
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/desktops/gnome-3/misc/gnome-flashback/fix-paths.patch b/pkgs/desktops/gnome-3/misc/gnome-flashback/fix-paths.patch
new file mode 100644
index 000000000000..9d5add233d61
--- /dev/null
+++ b/pkgs/desktops/gnome-3/misc/gnome-flashback/fix-paths.patch
@@ -0,0 +1,30 @@
+--- a/data/Makefile.am
++++ b/data/Makefile.am
+@@ -22,7 +22,7 @@
+ 	             echo 'if [ -z $$XDG_CURRENT_DESKTOP ]; then' && \
+ 	             echo '  export XDG_CURRENT_DESKTOP="GNOME-Flashback:GNOME"' && \
+ 	             echo 'fi' && echo '' && \
+-	             echo 'exec gnome-session --session=gnome-flashback-compiz "$$@"') > $@
++	             echo 'exec @gnomeSession@/bin/gnome-session --session=gnome-flashback-compiz "$$@"') > $@
+ 	$(AM_V_at) chmod a+x $@
+ 
+ gnome-flashback-metacity: Makefile
+@@ -30,7 +30,7 @@
+ 	             echo 'if [ -z $$XDG_CURRENT_DESKTOP ]; then' && \
+ 	             echo '  export XDG_CURRENT_DESKTOP="GNOME-Flashback:GNOME"' && \
+ 	             echo 'fi' && echo '' && \
+-	             echo 'exec gnome-session --session=gnome-flashback-metacity --disable-acceleration-check "$$@"') > $@
++	             echo 'exec @gnomeSession@/bin/gnome-session --session=gnome-flashback-metacity --disable-acceleration-check "$$@"') > $@
+ 	$(AM_V_at) chmod a+x $@
+ 
+ CLEANFILES = \
+--- a/data/xsessions/gnome-flashback-metacity.desktop.in.in
++++ b/data/xsessions/gnome-flashback-metacity.desktop.in.in
+@@ -2,6 +2,6 @@
+ Name=GNOME Flashback (Metacity)
+ Comment=This session logs you into GNOME Flashback with Metacity
+ Exec=@libexecdir@/gnome-flashback-metacity
+-TryExec=metacity
++TryExec=@metacity@/bin/metacity
+ Type=Application
+ DesktopNames=GNOME-Flashback;GNOME;
diff --git a/pkgs/desktops/gnome-3/misc/gnome-panel/default.nix b/pkgs/desktops/gnome-3/misc/gnome-panel/default.nix
new file mode 100644
index 000000000000..5c40b4c8f441
--- /dev/null
+++ b/pkgs/desktops/gnome-3/misc/gnome-panel/default.nix
@@ -0,0 +1,92 @@
+{ stdenv
+, fetchurl
+, autoreconfHook
+, fetchpatch
+, dconf
+, evolution-data-server
+, gdm
+, gettext
+, glib
+, gnome-desktop
+, gnome-menus
+, gnome3
+, gtk
+, itstool
+, libgweather
+, libsoup
+, libwnck3
+, libxml2
+, pkgconfig
+, polkit
+, systemd
+, wrapGAppsHook }:
+
+let
+  pname = "gnome-panel";
+  version = "3.28.0";
+in stdenv.mkDerivation rec {
+  name = "${pname}-${version}";
+
+  outputs = [ "out" "dev" "man" ];
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
+    sha256 = "1004cp9cxqpic9lsraqn5c1739acn4sn4ql3c1fja99hv22h1ziv";
+  };
+
+  patches = [
+    # https://github.com/NixOS/nixpkgs/issues/36468
+    # https://gitlab.gnome.org/GNOME/gnome-panel/issues/6
+    (fetchpatch {
+      url = https://gitlab.gnome.org/GNOME/gnome-panel/commit/be26e170a10c297949a6d9f3cbc70b6caaf04b56.patch;
+      sha256 = "10gxl9fwbv5j0s1lz7gkz6wqpda5wfzs49r5khbk1h05lv0hk4l4";
+    })
+  ];
+
+  nativeBuildInputs = [
+    autoreconfHook
+    gettext
+    itstool
+    libxml2
+    pkgconfig
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    dconf
+    evolution-data-server
+    gdm
+    glib
+    gnome-desktop
+    gnome-menus
+    gtk
+    libgweather
+    libsoup
+    libwnck3
+    polkit
+    systemd
+  ];
+
+  configureFlags = [
+    "--enable-eds"
+  ];
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  passthru = {
+    updateScript = gnome3.updateScript {
+      packageName = pname;
+      attrPath = "gnome3.${pname}";
+    };
+  };
+
+  meta = with stdenv.lib; {
+    description = "Component of Gnome Flashback that provides panels and default applets for the desktop";
+    homepage = https://wiki.gnome.org/Projects/GnomePanel;
+    license = licenses.gpl2Plus;
+    maintainers = gnome3.maintainers;
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/desktops/gnome-3/misc/gpaste/default.nix b/pkgs/desktops/gnome-3/misc/gpaste/default.nix
index a01820578733..add6addaec08 100644
--- a/pkgs/desktops/gnome-3/misc/gpaste/default.nix
+++ b/pkgs/desktops/gnome-3/misc/gpaste/default.nix
@@ -10,6 +10,22 @@ stdenv.mkDerivation rec {
     sha256 = "1zfx73qpw976hyzp5k569lywsq2b6dbnnzf2cvhjvn3mvkw8pin2";
   };
 
+  patches = [
+    ./fix-paths.patch
+  ];
+
+  # TODO: switch to substituteAll with placeholder
+  # https://github.com/NixOS/nix/issues/1846
+  # https://github.com/NixOS/nixpkgs/pull/37693
+  postPatch = ''
+    substituteInPlace src/gnome-shell/extension.js \
+      --subst-var-by typelibPath "$out/lib/girepository-1.0"
+    substituteInPlace src/gnome-shell/prefs.js \
+      --subst-var-by typelibPath "$out/lib/girepository-1.0"
+    substituteInPlace src/libgpaste/settings/gpaste-settings.c \
+      --subst-var-by gschemasCompiled "$out/share/gsettings-schemas/${name}/glib-2.0/schemas"
+  '';
+
   nativeBuildInputs = [ autoreconfHook pkgconfig vala wrapGAppsHook ];
   buildInputs = [ glib gjs mutter gnome3.adwaita-icon-theme
                   gtk3 gnome3.gnome-control-center dbus
diff --git a/pkgs/desktops/gnome-3/misc/gpaste/fix-paths.patch b/pkgs/desktops/gnome-3/misc/gpaste/fix-paths.patch
new file mode 100644
index 000000000000..ca6b9a5b22ed
--- /dev/null
+++ b/pkgs/desktops/gnome-3/misc/gpaste/fix-paths.patch
@@ -0,0 +1,55 @@
+--- a/src/gnome-shell/extension.js
++++ b/src/gnome-shell/extension.js
+@@ -7,6 +7,8 @@
+ 
+ const Config = imports.misc.config;
+ 
++imports.gi.GIRepository.Repository.prepend_search_path('@typelibPath@');
++
+ imports.gi.versions.Clutter = Config.LIBMUTTER_API_VERSION;
+ imports.gi.versions.GLib = '2.0';
+ imports.gi.versions.GPaste = '1.0';
+--- a/src/gnome-shell/prefs.js
++++ b/src/gnome-shell/prefs.js
+@@ -7,6 +7,8 @@
+ 
+ const Gettext = imports.gettext;
+ 
++imports.gi.GIRepository.Repository.prepend_search_path('@typelibPath@');
++
+ const GPaste = imports.gi.GPaste;
+ 
+ const ExtensionUtils = imports.misc.extensionUtils;
+--- a/src/libgpaste/settings/gpaste-settings.c
++++ b/src/libgpaste/settings/gpaste-settings.c
+@@ -22,6 +22,8 @@
+ 
+ typedef struct
+ {
++    GSettingsSchemaSource *schema_source;
++    GSettingsSchema *schema;
+     GSettings *settings;
+     GSettings *shell_settings;
+ 
+@@ -919,6 +921,8 @@
+     {
+         g_signal_handler_disconnect (settings, priv->c_signals[C_CHANGED]);
+         g_clear_object (&priv->settings);
++        g_settings_schema_unref (priv->schema);
++        g_settings_schema_source_unref (priv->schema_source);
+     }
+ 
+     if (shell_settings)
+@@ -1000,7 +1004,11 @@
+ g_paste_settings_init (GPasteSettings *self)
+ {
+     GPasteSettingsPrivate *priv = g_paste_settings_get_instance_private (self);
+-    GSettings *settings = priv->settings = g_settings_new (G_PASTE_SETTINGS_NAME);
++
++    // library used by introspection requires schemas but we cannot set XDG_DATA_DIRS for the library
++    GSettingsSchemaSource *schema_source = priv->schema_source = g_settings_schema_source_new_from_directory ("@gschemasCompiled@", NULL, FALSE, NULL);
++    priv->schema = g_settings_schema_source_lookup (schema_source, G_PASTE_SETTINGS_NAME, FALSE);
++    GSettings *settings = priv->settings = g_settings_new_full (priv->schema, NULL, NULL);
+ 
+     priv->history_name = NULL;
+     priv->launch_ui = NULL;
diff --git a/pkgs/desktops/gnome-3/misc/libgnome-games-support/default.nix b/pkgs/desktops/gnome-3/misc/libgnome-games-support/default.nix
index 3b580abed12c..7e28c90813a0 100644
--- a/pkgs/desktops/gnome-3/misc/libgnome-games-support/default.nix
+++ b/pkgs/desktops/gnome-3/misc/libgnome-games-support/default.nix
@@ -13,7 +13,11 @@ in stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [ pkgconfig intltool ];
-  buildInputs = [ glib gtk3 libgee libintl ];
+  buildInputs = [ libintl ];
+  propagatedBuildInputs = [
+    # Required by libgnome-games-support-1.pc
+    glib gtk3 libgee
+  ];
 
   passthru = {
     updateScript = gnome3.updateScript {
diff --git a/pkgs/desktops/gnome-3/misc/metacity/default.nix b/pkgs/desktops/gnome-3/misc/metacity/default.nix
new file mode 100644
index 000000000000..46ff2c118137
--- /dev/null
+++ b/pkgs/desktops/gnome-3/misc/metacity/default.nix
@@ -0,0 +1,70 @@
+{ stdenv
+, fetchurl
+, gettext
+, glib
+, gnome3
+, gsettings-desktop-schemas
+, gtk
+, libcanberra-gtk3
+, libgtop
+, libstartup_notification
+, libxml2
+, pkgconfig
+, substituteAll
+, wrapGAppsHook
+, zenity }:
+
+let
+  pname = "metacity";
+  version = "3.28.0";
+in stdenv.mkDerivation rec {
+  name = "${pname}-${version}";
+
+  src = fetchurl {
+    url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
+    sha256 = "0kzap0lzlkcgkna3h426xgwrn2zpipy8cfsxpfynnaf74vyas3aw";
+  };
+
+  patches = [
+    (substituteAll {
+      src = ./fix-paths.patch;
+      inherit zenity;
+    })
+  ];
+
+  nativeBuildInputs = [
+    gettext
+    libxml2
+    pkgconfig
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    glib
+    gsettings-desktop-schemas
+    gtk
+    libcanberra-gtk3
+    libgtop
+    libstartup_notification
+    zenity
+  ];
+
+  enableParallelBuilding = true;
+
+  passthru = {
+    updateScript = gnome3.updateScript {
+      packageName = pname;
+      attrPath = "gnome3.${pname}";
+    };
+  };
+
+  doCheck = true;
+
+  meta = with stdenv.lib; {
+    description = "Window manager used in Gnome Flashback";
+    homepage = https://wiki.gnome.org/Projects/Metacity;
+    license = licenses.gpl2;
+    maintainers = gnome3.maintainers;
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/desktops/gnome-3/misc/metacity/fix-paths.patch b/pkgs/desktops/gnome-3/misc/metacity/fix-paths.patch
new file mode 100644
index 000000000000..ff3a244e67d9
--- /dev/null
+++ b/pkgs/desktops/gnome-3/misc/metacity/fix-paths.patch
@@ -0,0 +1,11 @@
+--- a/src/core/util.c
++++ b/src/core/util.c
+@@ -424,7 +424,7 @@
+                                  g_slist_length (columns)*2 +
+                                  g_slist_length (entries)));
+ 
+-  argvl[i++] = "zenity";
++  argvl[i++] = "@zenity@/bin/zenity";
+   argvl[i++] = type;
+   argvl[i++] = "--display";
+   argvl[i++] = display;