summary refs log tree commit diff
path: root/pkgs/desktops/gnome-3
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/desktops/gnome-3')
-rw-r--r--pkgs/desktops/gnome-3/core/gnome-desktop/default.nix26
-rw-r--r--pkgs/desktops/gnome-3/core/gnome-terminal/default.nix36
-rw-r--r--pkgs/desktops/gnome-3/core/gucharmap/default.nix27
-rw-r--r--pkgs/desktops/gnome-3/core/vte/default.nix7
-rw-r--r--pkgs/desktops/gnome-3/default.nix22
-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/metacity/default.nix70
-rw-r--r--pkgs/desktops/gnome-3/misc/metacity/fix-paths.patch11
11 files changed, 486 insertions, 37 deletions
diff --git a/pkgs/desktops/gnome-3/core/gnome-desktop/default.nix b/pkgs/desktops/gnome-3/core/gnome-desktop/default.nix
index 13f4b1ef638..e909a356866 100644
--- a/pkgs/desktops/gnome-3/core/gnome-desktop/default.nix
+++ b/pkgs/desktops/gnome-3/core/gnome-desktop/default.nix
@@ -1,27 +1,26 @@
 { stdenv, fetchurl, pkgconfig, libxslt, which, libX11, gnome3, gtk3, glib
-, intltool, gnome-doc-utils, xkeyboard_config, isocodes, itstool, wayland
-, libseccomp, bubblewrap, gobjectIntrospection }:
+, intltool, libxml2, xkeyboard_config, isocodes, itstool, wayland
+, libseccomp, bubblewrap, gobjectIntrospection, gtk-doc, docbook_xsl }:
 
 stdenv.mkDerivation rec {
   name = "gnome-desktop-${version}";
   version = "3.28.2";
 
+  outputs = [ "out" "dev" "devdoc" ];
+
   src = fetchurl {
     url = "mirror://gnome/sources/gnome-desktop/${gnome3.versionBranch version}/${name}.tar.xz";
     sha256 = "0c439hhpfd9axmv4af6fzhibksh69pnn2nnbghbbqqbwy6zqfl30";
   };
 
-  passthru = {
-    updateScript = gnome3.updateScript { packageName = "gnome-desktop"; attrPath = "gnome3.gnome-desktop"; };
-  };
-
-  # this should probably be setuphook for glib
+  # TODO: remove with 3.30
   NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0";
 
   enableParallelBuilding = true;
 
   nativeBuildInputs = [
-    pkgconfig which itstool intltool libxslt gnome-doc-utils gobjectIntrospection
+    pkgconfig which itstool intltool libxslt libxml2 gobjectIntrospection
+    gtk-doc docbook_xsl
   ];
   buildInputs = [
     libX11 bubblewrap xkeyboard_config isocodes wayland
@@ -34,11 +33,22 @@ stdenv.mkDerivation rec {
     ./bubblewrap-paths.patch
   ];
 
+  configureFlags = [
+    "--enable-gtk-doc"
+  ];
+
   postPatch = ''
     substituteInPlace libgnome-desktop/gnome-desktop-thumbnail-script.c --subst-var-by \
       BUBBLEWRAP_BIN "${bubblewrap}/bin/bwrap"
   '';
 
+  passthru = {
+    updateScript = gnome3.updateScript {
+      packageName = "gnome-desktop";
+      attrPath = "gnome3.gnome-desktop";
+    };
+  };
+
   meta = with stdenv.lib; {
     description = "Library with common API for various GNOME modules";
     license = with licenses; [ gpl2 lgpl2 ];
diff --git a/pkgs/desktops/gnome-3/core/gnome-terminal/default.nix b/pkgs/desktops/gnome-3/core/gnome-terminal/default.nix
index d224f056170..a0318514c9b 100644
--- a/pkgs/desktops/gnome-3/core/gnome-terminal/default.nix
+++ b/pkgs/desktops/gnome-3/core/gnome-terminal/default.nix
@@ -1,6 +1,6 @@
-{ stdenv, fetchurl, pkgconfig, libxml2, gnome3
-, gnome-doc-utils, intltool, which, libuuid, vala
-, desktop-file-utils, itstool, wrapGAppsHook, appdata-tools }:
+{ stdenv, fetchurl, pkgconfig, libxml2, gnome3, dconf, nautilus
+, gtk, gsettings-desktop-schemas, vte, intltool, which, libuuid, vala
+, desktop-file-utils, itstool, wrapGAppsHook }:
 
 stdenv.mkDerivation rec {
   name = "gnome-terminal-${version}";
@@ -11,15 +11,16 @@ stdenv.mkDerivation rec {
     sha256 = "0ybjansg6lr279191w8z8r45gy4rxwzw1ajm98cgkv0fk2jdr0x2";
   };
 
-  passthru = {
-    updateScript = gnome3.updateScript { packageName = "gnome-terminal"; attrPath = "gnome3.gnome-terminal"; };
-  };
-
-  buildInputs = [ gnome3.gtk gnome3.gsettings-desktop-schemas gnome3.vte appdata-tools
-                  gnome3.dconf itstool gnome3.nautilus ];
+  buildInputs = [
+    gtk gsettings-desktop-schemas vte libuuid dconf
+    # For extension
+    nautilus
+  ];
 
-  nativeBuildInputs = [ pkgconfig intltool gnome-doc-utils which libuuid libxml2
-                        vala desktop-file-utils wrapGAppsHook ];
+  nativeBuildInputs = [
+    pkgconfig intltool itstool which libxml2
+    vala desktop-file-utils wrapGAppsHook
+  ];
 
   # Silly ./configure, it looks for dbus file from gnome-shell in the
   # installation tree of the package it is configuring.
@@ -28,15 +29,22 @@ stdenv.mkDerivation rec {
     substituteInPlace src/Makefile.in --replace '$(dbusinterfacedir)/org.gnome.ShellSearchProvider2.xml' "${gnome3.gnome-shell}/share/dbus-1/interfaces/org.gnome.ShellSearchProvider2.xml"
   '';
 
-  # FIXME: enable for gnome3
-  configureFlags = [ "--disable-migration" ];
+  configureFlags = [ "--disable-migration" ]; # TODO: remove this with 3.30
+
+  passthru = {
+    updateScript = gnome3.updateScript {
+      packageName = "gnome-terminal";
+      attrPath = "gnome3.gnome-terminal";
+    };
+  };
 
   enableParallelBuilding = true;
 
   meta = with stdenv.lib; {
     description = "The GNOME Terminal Emulator";
-    homepage = https://wiki.gnome.org/Apps/Terminal/;
+    homepage = https://wiki.gnome.org/Apps/Terminal;
     platforms = platforms.linux;
+    license = licenses.gpl3Plus;
     maintainers = gnome3.maintainers;
   };
 }
diff --git a/pkgs/desktops/gnome-3/core/gucharmap/default.nix b/pkgs/desktops/gnome-3/core/gucharmap/default.nix
index 861702a3986..797eb00bd3f 100644
--- a/pkgs/desktops/gnome-3/core/gucharmap/default.nix
+++ b/pkgs/desktops/gnome-3/core/gucharmap/default.nix
@@ -1,6 +1,7 @@
-{ stdenv, intltool, fetchFromGitLab, pkgconfig, gtk3, defaultIconTheme
-, glib, desktop-file-utils, appdata-tools, gtk-doc, autoconf, automake, libtool
-, wrapGAppsHook, gnome3, itstool, libxml2
+{ stdenv, intltool, fetchFromGitLab, fetchpatch, pkgconfig, gtk3, defaultIconTheme
+, glib, desktop-file-utils, gtk-doc, autoconf, automake, libtool
+, wrapGAppsHook, gnome3, itstool, libxml2, yelp-tools
+, docbook_xsl, docbook_xml_dtd_412, gsettings-desktop-schemas
 , callPackage, unzip, gobjectIntrospection }:
 
 let
@@ -9,6 +10,8 @@ in stdenv.mkDerivation rec {
   name = "gucharmap-${version}";
   version = "11.0.1";
 
+  outputs = [ "out" "lib" "dev" "devdoc" ];
+
   src = fetchFromGitLab {
     domain = "gitlab.gnome.org";
     owner = "GNOME";
@@ -17,16 +20,26 @@ in stdenv.mkDerivation rec {
     sha256 = "13iw4fa6mv8vi8bkwk0bbhamnzbaih0c93p4rh07khq6mxa6hnpi";
   };
 
+  patches = [
+    # Fix locale path to allow split outputs
+    # https://gitlab.gnome.org/GNOME/gucharmap/issues/10
+    (fetchpatch {
+      url = https://gitlab.gnome.org/GNOME/gucharmap/commit/b2b03f16aa869ac0ec1a05c55c4d4e4c4b513576.patch;
+      sha256 = "1543mcyz96x23m9pzx04ny15m4a2pqmiksl1y5r51k3sw4fyisci";
+    })
+  ];
+
   nativeBuildInputs = [
-    pkgconfig wrapGAppsHook unzip intltool itstool appdata-tools
-    autoconf automake libtool gtk-doc
-    gnome3.yelp-tools libxml2 desktop-file-utils gobjectIntrospection
+    pkgconfig wrapGAppsHook unzip intltool itstool
+    autoconf automake libtool gtk-doc docbook_xsl docbook_xml_dtd_412
+    yelp-tools libxml2 desktop-file-utils gobjectIntrospection
   ];
 
-  buildInputs = [ gtk3 glib gnome3.gsettings-desktop-schemas defaultIconTheme ];
+  buildInputs = [ gtk3 glib gsettings-desktop-schemas defaultIconTheme ];
 
   configureFlags = [
     "--with-unicode-data=${unicode-data}"
+    "--enable-gtk-doc"
   ];
 
   doCheck = true;
diff --git a/pkgs/desktops/gnome-3/core/vte/default.nix b/pkgs/desktops/gnome-3/core/vte/default.nix
index 17385ab7202..47a2c2f19d3 100644
--- a/pkgs/desktops/gnome-3/core/vte/default.nix
+++ b/pkgs/desktops/gnome-3/core/vte/default.nix
@@ -19,7 +19,12 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ gobjectIntrospection intltool pkgconfig vala gperf libxml2 ];
   buildInputs = [ gnome3.glib gnome3.gtk3 ncurses ];
 
-  propagatedBuildInputs = [ gnutls pcre2 ];
+  propagatedBuildInputs = [
+    # Required by vte-2.91.pc.
+    gnome3.gtk3
+    gnutls
+    pcre2
+  ];
 
   preConfigure = "patchShebangs .";
 
diff --git a/pkgs/desktops/gnome-3/default.nix b/pkgs/desktops/gnome-3/default.nix
index ce542e7f88b..478dfc5d9f4 100644
--- a/pkgs/desktops/gnome-3/default.nix
+++ b/pkgs/desktops/gnome-3/default.nix
@@ -187,31 +187,31 @@ lib.makeScope pkgs.newScope (self: with self; {
   nautilus = callPackage ./core/nautilus { };
 
   networkmanager-openvpn = pkgs.networkmanager-openvpn.override {
-    inherit gnome3;
+    withGnome = true;
   };
 
   networkmanager-vpnc = pkgs.networkmanager-vpnc.override {
-    inherit gnome3;
+    withGnome = true;
   };
 
   networkmanager-openconnect = pkgs.networkmanager-openconnect.override {
-    inherit gnome3;
+    withGnome = true;
   };
 
   networkmanager-fortisslvpn = pkgs.networkmanager-fortisslvpn.override {
-    inherit gnome3;
+    withGnome = true;
   };
 
   networkmanager-l2tp = pkgs.networkmanager-l2tp.override {
-    inherit gnome3;
+    withGnome = true;
   };
 
   networkmanager-iodine = pkgs.networkmanager-iodine.override {
-    inherit gnome3;
+    withGnome = true;
   };
 
   networkmanagerapplet = pkgs.networkmanagerapplet.override {
-    inherit gnome3 gsettings-desktop-schemas glib-networking;
+    withGnome = true;
   };
 
   rest = callPackage ./core/rest { };
@@ -373,10 +373,18 @@ lib.makeScope pkgs.newScope (self: with self; {
 
   gexiv2 = callPackage ./misc/gexiv2 { };
 
+  gnome-applets = callPackage ./misc/gnome-applets { };
+
+  gnome-flashback = callPackage ./misc/gnome-flashback { };
+
+  gnome-panel = callPackage ./misc/gnome-panel { };
+
   gnome-tweaks = callPackage ./misc/gnome-tweaks { };
 
   gpaste = callPackage ./misc/gpaste { };
 
+  metacity = callPackage ./misc/metacity { };
+
   pidgin-im-gnome-shell-extension = callPackage ./misc/pidgin { };
 
   gtkhtml = callPackage ./misc/gtkhtml { };
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 00000000000..cbf8bc9707b
--- /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 00000000000..f3f2cf99257
--- /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 00000000000..9d5add233d6
--- /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 00000000000..5c40b4c8f44
--- /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/metacity/default.nix b/pkgs/desktops/gnome-3/misc/metacity/default.nix
new file mode 100644
index 00000000000..46ff2c11813
--- /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 00000000000..ff3a244e67d
--- /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;