about summary refs log tree commit diff
path: root/nixpkgs/pkgs/desktops/xfce/core
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:36 +0000
committerAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:47 +0000
commit36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch)
treeb3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/desktops/xfce/core
parent4e31070265257dc67d120c27e0f75c2344fdfa9a (diff)
parentabf060725d7614bd3b9f96764262dfbc2f9c2199 (diff)
downloadnixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs
git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a
git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/desktops/xfce/core')
-rw-r--r--nixpkgs/pkgs/desktops/xfce/core/exo.nix27
-rw-r--r--nixpkgs/pkgs/desktops/xfce/core/garcon-10967.patch14
-rw-r--r--nixpkgs/pkgs/desktops/xfce/core/garcon-12700.patch44
-rw-r--r--nixpkgs/pkgs/desktops/xfce/core/garcon.nix27
-rw-r--r--nixpkgs/pkgs/desktops/xfce/core/gtk-xfce-engine.nix31
-rw-r--r--nixpkgs/pkgs/desktops/xfce/core/libxfce4ui.nix42
-rw-r--r--nixpkgs/pkgs/desktops/xfce/core/libxfce4util.nix27
-rw-r--r--nixpkgs/pkgs/desktops/xfce/core/libxfcegui4.nix37
-rw-r--r--nixpkgs/pkgs/desktops/xfce/core/thunar-build.nix42
-rw-r--r--nixpkgs/pkgs/desktops/xfce/core/thunar-volman.nix30
-rw-r--r--nixpkgs/pkgs/desktops/xfce/core/thunar.nix68
-rw-r--r--nixpkgs/pkgs/desktops/xfce/core/thunarx_plugins_directory.patch48
-rw-r--r--nixpkgs/pkgs/desktops/xfce/core/tumbler.nix42
-rw-r--r--nixpkgs/pkgs/desktops/xfce/core/xfce4-appfinder.nix29
-rw-r--r--nixpkgs/pkgs/desktops/xfce/core/xfce4-dev-tools.nix28
-rw-r--r--nixpkgs/pkgs/desktops/xfce/core/xfce4-light-locker.patch25
-rw-r--r--nixpkgs/pkgs/desktops/xfce/core/xfce4-panel-datadir.patch24
-rw-r--r--nixpkgs/pkgs/desktops/xfce/core/xfce4-panel.nix59
-rw-r--r--nixpkgs/pkgs/desktops/xfce/core/xfce4-power-manager.nix45
-rw-r--r--nixpkgs/pkgs/desktops/xfce/core/xfce4-session.nix45
-rw-r--r--nixpkgs/pkgs/desktops/xfce/core/xfce4-settings-default-icon-theme.patch11
-rw-r--r--nixpkgs/pkgs/desktops/xfce/core/xfce4-settings.nix54
-rw-r--r--nixpkgs/pkgs/desktops/xfce/core/xfconf.nix30
-rw-r--r--nixpkgs/pkgs/desktops/xfce/core/xfdesktop.nix36
-rw-r--r--nixpkgs/pkgs/desktops/xfce/core/xfwm4.nix32
25 files changed, 897 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/desktops/xfce/core/exo.nix b/nixpkgs/pkgs/desktops/xfce/core/exo.nix
new file mode 100644
index 000000000000..6b5ee4b31328
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/xfce/core/exo.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl, pkgconfig, intltool, URI, glib, gtk, libxfce4ui, libxfce4util
+, hicolor-icon-theme }:
+
+stdenv.mkDerivation rec {
+  p_name  = "exo";
+  ver_maj = "0.10";
+  ver_min = "7";
+
+  src = fetchurl {
+    url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "521581481128af93e815f9690020998181f947ac9e9c2b232b1f144d76b1b35c";
+  };
+  name = "${p_name}-${ver_maj}.${ver_min}";
+
+  outputs = [ "out" "dev" "devdoc" ];
+    # lib/xfce4/exo-1/exo-compose-mail-1 is a perl script :-/
+
+  nativeBuildInputs = [ pkgconfig intltool ];
+  buildInputs = [ URI glib gtk libxfce4ui libxfce4util hicolor-icon-theme ];
+
+  meta = with stdenv.lib; {
+    homepage = "http://www.xfce.org/projects/${p_name}";
+    description = "Application library for the Xfce desktop environment";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/desktops/xfce/core/garcon-10967.patch b/nixpkgs/pkgs/desktops/xfce/core/garcon-10967.patch
new file mode 100644
index 000000000000..aea123255478
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/xfce/core/garcon-10967.patch
@@ -0,0 +1,14 @@
+diff -urNZ a/garcon-gtk/garcon-gtk-menu.c b/garcon-gtk/garcon-gtk-menu.c
+--- a/garcon-gtk/garcon-gtk-menu.c	2017-11-16 19:22:33.551926068 +0000
++++ b/garcon-gtk/garcon-gtk-menu.c	2017-11-16 19:23:33.055497211 +0000
+@@ -676,6 +676,9 @@
+                   G_CALLBACK (garcon_gtk_menu_deactivate), menu);
+               gtk_widget_show (mi);
+ 
++	      /* submenu are child items, too. */
++	      has_children = TRUE;
++	      
+               if (menu->priv->show_menu_icons)
+                 {
+                   icon_name = garcon_menu_element_get_icon_name (li->data);
+Binary files a/.git/index and b/.git/index differ
diff --git a/nixpkgs/pkgs/desktops/xfce/core/garcon-12700.patch b/nixpkgs/pkgs/desktops/xfce/core/garcon-12700.patch
new file mode 100644
index 000000000000..b95a65cc2194
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/xfce/core/garcon-12700.patch
@@ -0,0 +1,44 @@
+From 222080e6d5fce85eb2a8a5c33df671bd9f21add8 Mon Sep 17 00:00:00 2001
+From: Yegor Timoshenko <yegortimoshenko@gmail.com>
+Date: Thu, 14 Dec 2017 22:04:04 +0000
+Subject: [PATCH] Decrement allocation counter on item unref (#12700)
+
+---
+ garcon/garcon-menu-item-pool.c | 7 ++++++-
+ garcon/garcon-menu-item.c      | 2 ++
+ 2 files changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/garcon/garcon-menu-item-pool.c b/garcon/garcon-menu-item-pool.c
+index 2017180..355e520 100644
+--- a/garcon/garcon-menu-item-pool.c
++++ b/garcon/garcon-menu-item-pool.c
+@@ -191,7 +191,12 @@ garcon_menu_item_pool_filter_exclude (const gchar    *desktop_id,
+   g_return_val_if_fail (GARCON_IS_MENU_ITEM (item), FALSE);
+   g_return_val_if_fail (node != NULL, FALSE);
+ 
+-  return garcon_menu_node_tree_rule_matches (node, item);
++  gboolean matches = garcon_menu_node_tree_rule_matches (node, item);
++
++  if (matches)
++    garcon_menu_item_increment_allocated (item);
++
++  return matches;
+ }
+ 
+ 
+diff --git a/garcon/garcon-menu-item.c b/garcon/garcon-menu-item.c
+index 66a86bf..d61c88f 100644
+--- a/garcon/garcon-menu-item.c
++++ b/garcon/garcon-menu-item.c
+@@ -1516,6 +1516,8 @@ garcon_menu_item_unref (GarconMenuItem *item)
+ {
+   g_return_if_fail (GARCON_IS_MENU_ITEM (item));
+ 
++  garcon_menu_item_decrement_allocated (item);
++
+   /* Decrement the reference counter */
+   g_object_unref (G_OBJECT (item));
+ }
+-- 
+2.15.1
+
diff --git a/nixpkgs/pkgs/desktops/xfce/core/garcon.nix b/nixpkgs/pkgs/desktops/xfce/core/garcon.nix
new file mode 100644
index 000000000000..d9c918c0fdc1
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/xfce/core/garcon.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl, pkgconfig, intltool, glib, libxfce4util, libxfce4ui, gtk }:
+let
+  p_name  = "garcon";
+  ver_maj = "0.4";
+  ver_min = "0";
+in
+stdenv.mkDerivation rec {
+  name = "${p_name}-${ver_maj}.${ver_min}";
+
+  src = fetchurl {
+    url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "0wm9pjbwq53s3n3nwvsyf0q8lbmhiy2ln3bn5ncihr9vf5cwhzbq";
+  };
+
+  outputs = [ "out" "dev" ];
+  patches = [ ./garcon-10967.patch ./garcon-12700.patch ];
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ intltool glib libxfce4util gtk libxfce4ui ];
+
+  meta = with stdenv.lib; {
+    homepage = http://www.xfce.org/;
+    description = "Xfce menu support library";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/desktops/xfce/core/gtk-xfce-engine.nix b/nixpkgs/pkgs/desktops/xfce/core/gtk-xfce-engine.nix
new file mode 100644
index 000000000000..0d69d4d2f32b
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/xfce/core/gtk-xfce-engine.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchurl, pkgconfig, intltool, gtk2, withGtk3 ? false, gtk3 ? null }:
+
+assert withGtk3 -> (gtk3 != null);
+
+stdenv.mkDerivation rec {
+  p_name  = "gtk-xfce-engine";
+  ver_maj = "3.2";
+  ver_min = "0";
+
+  src = fetchurl {
+    url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "1va71f3gpl8gikfkmqsd5ikgp7qj8b64jii2l98g1ylnv8xrqp47";
+  };
+  name = "${p_name}-${ver_maj}.${ver_min}";
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ intltool gtk2 ] ++ stdenv.lib.optional withGtk3 gtk3;
+
+  # `glib-mkenums' is unhappy that some source files are not valid UTF-8
+  postPatch = ''find . -type f -name '*.[ch]' -exec sed -r -i 's/\xD6/O/g' {} +'';
+
+  configureFlags = stdenv.lib.optional withGtk3 "--enable-gtk3";
+
+  meta = {
+    homepage = http://www.xfce.org/;
+    description = "GTK+ theme engine for Xfce";
+    license = stdenv.lib.licenses.gpl2Plus;
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.eelco ];
+  };
+}
diff --git a/nixpkgs/pkgs/desktops/xfce/core/libxfce4ui.nix b/nixpkgs/pkgs/desktops/xfce/core/libxfce4ui.nix
new file mode 100644
index 000000000000..e8d5b4acd769
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/xfce/core/libxfce4ui.nix
@@ -0,0 +1,42 @@
+{ stdenv, fetchurl, pkgconfig, intltool, xorg, gtk, libxfce4util, xfconf
+, libglade, libstartup_notification, hicolor-icon-theme
+, withGtk3 ? false, gtk3
+}:
+let
+  p_name  = "libxfce4ui";
+  ver_maj = "4.12";
+  ver_min = "1";
+  inherit (stdenv.lib) optional;
+in
+stdenv.mkDerivation rec {
+  name = "${p_name}-${ver_maj}.${ver_min}";
+
+  src = fetchurl {
+    url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "3d619811bfbe7478bb984c16543d980cadd08586365a7bc25e59e3ca6384ff43";
+  };
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  nativeBuildInputs = [ pkgconfig intltool ];
+
+  buildInputs =
+    [ gtk libxfce4util xfconf libglade
+      libstartup_notification hicolor-icon-theme
+    ] ++ optional withGtk3 gtk3;
+
+  propagatedBuildInputs = [ xorg.libICE xorg.libSM ];
+
+  #TODO: glade?
+  configureFlags = optional withGtk3 "--enable-gtk3";
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    homepage = http://www.xfce.org/;
+    description = "Basic GUI library for Xfce";
+    license = licenses.lgpl2Plus;
+    platforms = platforms.linux;
+  };
+}
+
diff --git a/nixpkgs/pkgs/desktops/xfce/core/libxfce4util.nix b/nixpkgs/pkgs/desktops/xfce/core/libxfce4util.nix
new file mode 100644
index 000000000000..5a411bfbb5be
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/xfce/core/libxfce4util.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl, pkgconfig, glib, intltool }:
+let
+  p_name  = "libxfce4util";
+  ver_maj = "4.12";
+  ver_min = "1";
+in
+stdenv.mkDerivation rec {
+  name = "${p_name}-${ver_maj}.${ver_min}";
+
+  src = fetchurl {
+    url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "07c8r3xwx5is298zk77m3r784gmr5y4mh8bbca5zdjqk5vxdwsw7";
+  };
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ glib intltool ];
+
+  meta = {
+    homepage = http://www.xfce.org/;
+    description = "Basic utility non-GUI functions for Xfce";
+    license = "bsd";
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
+
diff --git a/nixpkgs/pkgs/desktops/xfce/core/libxfcegui4.nix b/nixpkgs/pkgs/desktops/xfce/core/libxfcegui4.nix
new file mode 100644
index 000000000000..7fe76057c930
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/xfce/core/libxfcegui4.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchurl, pkgconfig, intltool, gtk
+, libxfce4util, xfconf, libglade, libstartup_notification, hicolor-icon-theme }:
+let
+  p_name  = "libxfcegui4";
+  ver_maj = "4.10";
+  ver_min = "0";
+in
+stdenv.mkDerivation rec {
+  name = "${p_name}-${ver_maj}.${ver_min}";
+
+  src = fetchurl {
+    url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "0cs5im0ib0cmr1lhr5765yliqjfyxvk4kwy8h1l8bn3mj6bzk0ib";
+  };
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  #TODO: gladeui
+  # By default, libxfcegui4 tries to install into libglade's prefix.
+  # Install into our own prefix instead.
+  configureFlags = [
+    "--with-libglade-module-path=$(out)/lib/libglade/2.0"
+  ];
+  #NOTE: missing keyboard library support is OK according to the mailing-list
+
+  buildInputs =
+    [ pkgconfig intltool gtk libxfce4util xfconf libglade
+      libstartup_notification hicolor-icon-theme
+    ];
+
+  meta = {
+    homepage = http://www.xfce.org/;
+    description = "Basic GUI library for Xfce";
+    license = stdenv.lib.licenses.lgpl2Plus;
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/desktops/xfce/core/thunar-build.nix b/nixpkgs/pkgs/desktops/xfce/core/thunar-build.nix
new file mode 100644
index 000000000000..0b606ee5fdd7
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/xfce/core/thunar-build.nix
@@ -0,0 +1,42 @@
+{ stdenv, fetchurl, pkgconfig, intltool
+, gtk, dbus-glib, libstartup_notification, libnotify, libexif, pcre, udev
+, exo, libxfce4util, xfconf, xfce4-panel, hicolor-icon-theme, wrapGAppsHook
+}:
+
+stdenv.mkDerivation rec {
+  p_name  = "thunar";
+  ver_maj = "1.6";
+  ver_min = "10";
+
+  src = fetchurl {
+    url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/Thunar-${ver_maj}.${ver_min}.tar.bz2";
+    sha256 = "7e9d24067268900e5e44d3325e60a1a2b2f8f556ec238ec12574fbea15fdee8a";
+  };
+
+  name = "${p_name}-build-${ver_maj}.${ver_min}";
+
+  patches = [ ./thunarx_plugins_directory.patch ];
+
+  postPatch = ''
+    sed -i -e 's|thunar_dialogs_show_insecure_program (parent, _(".*"), file, exec)|1|' thunar/thunar-file.c
+  '';
+
+  nativeBuildInputs = [ pkgconfig wrapGAppsHook ];
+  buildInputs = [
+    intltool
+    gtk dbus-glib libstartup_notification libnotify libexif pcre udev
+    exo libxfce4util xfconf xfce4-panel
+    hicolor-icon-theme
+  ];
+  # TODO: optionality?
+
+  enableParallelBuilding = true;
+
+  meta = {
+    homepage = http://thunar.xfce.org/;
+    description = "Xfce file manager";
+    license = stdenv.lib.licenses.gpl2Plus;
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.eelco ];
+  };
+}
diff --git a/nixpkgs/pkgs/desktops/xfce/core/thunar-volman.nix b/nixpkgs/pkgs/desktops/xfce/core/thunar-volman.nix
new file mode 100644
index 000000000000..39214ca57b1f
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/xfce/core/thunar-volman.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchurl, pkgconfig, intltool, exo, gtk, libxfce4util, libxfce4ui
+, xfconf, udev, libgudev, libnotify, hicolor-icon-theme }:
+
+stdenv.mkDerivation rec {
+  p_name  = "thunar-volman";
+  ver_maj = "0.8";
+  ver_min = "1";
+  name = "${p_name}-${ver_maj}.${ver_min}";
+
+  src = fetchurl {
+    url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "1gf259n1v3y23n1zlkhyr6r0i8j59rnl1cmxvxj6la9cwdfbn22s";
+  };
+
+
+  buildInputs =
+    [ pkgconfig intltool exo gtk udev libgudev libxfce4ui libxfce4util
+      xfconf libnotify hicolor-icon-theme
+    ];
+
+  enableParallelBuilding = true;
+
+  meta = {
+    homepage = http://goodies.xfce.org/projects/thunar-plugins/thunar-volman;
+    description = "Thunar extension for automatic management of removable drives and media";
+    license = stdenv.lib.licenses.gpl2Plus;
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.eelco ];
+  };
+}
diff --git a/nixpkgs/pkgs/desktops/xfce/core/thunar.nix b/nixpkgs/pkgs/desktops/xfce/core/thunar.nix
new file mode 100644
index 000000000000..83e3a2879d79
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/xfce/core/thunar.nix
@@ -0,0 +1,68 @@
+{ stdenv, buildEnv, runCommand, makeWrapper, lndir, thunar-bare
+, thunarPlugins ? []
+}:
+
+with stdenv.lib; 
+
+let
+
+  build = thunar-bare;
+
+  replaceLnExeListWithWrapped = exeDir: exeNameList: mkWrapArgs: ''
+    exeDir="${exeDir}"
+    oriDir=`realpath -e "$exeDir"`
+    unlink "$exeDir"
+    mkdir -p "$exeDir"
+    lndir "$oriDir" "$exeDir"
+
+    exeList="${concatStrings (intersperse " " (map (x: "${exeDir}/${x}") exeNameList))}"
+
+    for exe in $exeList; do
+      oriExe=`realpath -e "$exe"`
+      rm -f "$exe"
+      makeWrapper "$oriExe" "$exe" ${concatStrings (intersperse " " mkWrapArgs)}
+    done
+  '';
+
+  name = "${build.p_name}-${build.ver_maj}.${build.ver_min}";
+
+  meta = {
+    inherit (build.meta) homepage license platforms;
+
+    description = build.meta.description + optionalString
+      (0 != length thunarPlugins)
+      " (with plugins: ${concatStrings (intersperse ", " (map (x: x.name) thunarPlugins))})";
+    maintainers = build.meta.maintainers /*++ [ jraygauthier ]*/;
+  };
+
+in
+
+# TODO: To be replaced with `buildEnv` awaiting missing features.
+runCommand name {
+  inherit build;
+  inherit meta;
+
+  nativeBuildInputs = [ makeWrapper lndir ];
+
+  dontPatchELF = true;
+  dontStrip = true;
+
+} 
+(let
+  buildWithPlugins = buildEnv {
+    name = "thunar-bare-with-plugins";
+    paths = [ build ] ++ thunarPlugins;
+  };
+
+in ''
+  mkdir -p $out
+  pushd ${buildWithPlugins} > /dev/null
+  for d in `find . -maxdepth 1 -name "*" -printf "%f\n" | tail -n+2`; do
+    ln -s "${buildWithPlugins}/$d" "$out/$d"
+  done
+  popd > /dev/null
+
+  ${replaceLnExeListWithWrapped "$out/bin" [ "thunar" "thunar-settings" ] [
+    "--set THUNARX_MODULE_DIR \"${buildWithPlugins}/lib/thunarx-2\""
+  ]}
+'')
diff --git a/nixpkgs/pkgs/desktops/xfce/core/thunarx_plugins_directory.patch b/nixpkgs/pkgs/desktops/xfce/core/thunarx_plugins_directory.patch
new file mode 100644
index 000000000000..e1431d86b147
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/xfce/core/thunarx_plugins_directory.patch
@@ -0,0 +1,48 @@
+diff --git a/thunarx/thunarx-provider-factory.c b/thunarx/thunarx-provider-factory.c
+index 31b8835..a3e7f4e 100644
+--- a/thunarx/thunarx-provider-factory.c
++++ b/thunarx/thunarx-provider-factory.c
+@@ -141,12 +141,19 @@ static GList*
+ thunarx_provider_factory_load_modules (ThunarxProviderFactory *factory)
+ {
+   ThunarxProviderModule *module;
++  const gchar           *thunar_dir;
+   const gchar           *name;
+   GList                 *modules = NULL;
+   GList                 *lp;
+   GDir                  *dp;
+ 
+-  dp = g_dir_open (THUNARX_DIRECTORY, 0, NULL);
++  thunar_dir = g_getenv("THUNARX_MODULE_DIR");
++  if (NULL == thunar_dir)
++    {
++      thunar_dir = THUNARX_DIRECTORY;
++    }
++
++  dp = g_dir_open (thunar_dir, 0, NULL);
+   if (G_LIKELY (dp != NULL))
+     {
+       /* determine the types for all existing plugins */
+diff --git a/thunarx/thunarx-provider-module.c b/thunarx/thunarx-provider-module.c
+index 023ad2a..6c21997 100644
+--- a/thunarx/thunarx-provider-module.c
++++ b/thunarx/thunarx-provider-module.c
+@@ -174,10 +174,17 @@ static gboolean
+ thunarx_provider_module_load (GTypeModule *type_module)
+ {
+   ThunarxProviderModule *module = THUNARX_PROVIDER_MODULE (type_module);
++  const gchar           *thunar_dir;
+   gchar                 *path;
++    
++  thunar_dir = g_getenv("THUNARX_MODULE_DIR");
++  if (NULL == thunar_dir)
++    {
++      thunar_dir = THUNARX_DIRECTORY;
++    }
+ 
+   /* load the module using the runtime link editor */
+-  path = g_build_filename (THUNARX_DIRECTORY, type_module->name, NULL);
++  path = g_build_filename (thunar_dir, type_module->name, NULL);
+   module->library = g_module_open (path, G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL);
+   g_free (path);
+ 
diff --git a/nixpkgs/pkgs/desktops/xfce/core/tumbler.nix b/nixpkgs/pkgs/desktops/xfce/core/tumbler.nix
new file mode 100644
index 000000000000..3e1d2be2b531
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/xfce/core/tumbler.nix
@@ -0,0 +1,42 @@
+{ stdenv, fetchurl, pkgconfig, intltool, dbus-glib, gdk_pixbuf, curl, freetype
+, libgsf, poppler, bzip2 }:
+let
+  p_name  = "tumbler";
+  ver_maj = "0.1";
+  ver_min = "31";
+in
+stdenv.mkDerivation rec {
+  name = "${p_name}-${ver_maj}.${ver_min}";
+
+  src = fetchurl {
+    url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "0wvip28gm2w061hn84zp2q4dv947ihylrppahn4cjspzff935zfh";
+  };
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [
+    intltool dbus-glib gdk_pixbuf curl freetype
+    poppler libgsf bzip2
+  ];
+
+  configureFlags = [
+    # Needs gst-tag
+    # "--enable-gstreamer-thumbnailer"
+
+    # Needs libffmpegthumbnailer
+    # "--enable-ffmpeg-thumbnailer"
+
+    "--enable-odf-thumbnailer"
+    "--enable-poppler-thumbnailer"
+  ];
+
+  meta = with stdenv.lib; {
+    homepage = http://git.xfce.org/xfce/tumbler/;
+    description = "A D-Bus thumbnailer service";
+    platforms = platforms.linux;
+    license = licenses.gpl2;
+  };
+}
+
diff --git a/nixpkgs/pkgs/desktops/xfce/core/xfce4-appfinder.nix b/nixpkgs/pkgs/desktops/xfce/core/xfce4-appfinder.nix
new file mode 100644
index 000000000000..d39708dd523f
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/xfce/core/xfce4-appfinder.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchurl, pkgconfig, intltool, glib, gtk, libxfce4util
+, libxfce4ui, garcon, xfconf }:
+let
+  p_name  = "xfce4-appfinder";
+  ver_maj = "4.12";
+  ver_min = "0";
+in
+stdenv.mkDerivation rec {
+  name = "${p_name}-${ver_maj}.${ver_min}";
+
+  src = fetchurl {
+    url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "0ry5hin8xhgnkmm9vs7jq8blk1cnbyr0s18nm1j6nsm7360abm1a";
+  };
+
+  buildInputs =
+    [ pkgconfig intltool glib gtk libxfce4util libxfce4ui garcon xfconf ];
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    homepage = http://docs.xfce.org/xfce/xfce4-appfinder/;
+    description = "Xfce application finder, a tool to locate and launch programs on your system";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.eelco ];
+  };
+}
+
diff --git a/nixpkgs/pkgs/desktops/xfce/core/xfce4-dev-tools.nix b/nixpkgs/pkgs/desktops/xfce/core/xfce4-dev-tools.nix
new file mode 100644
index 000000000000..109c22f1e58c
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/xfce/core/xfce4-dev-tools.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchurl, pkgconfig, glib, autoconf, automake, libtool, intltool }:
+let
+  p_name  = "xfce4-dev-tools";
+  ver_maj = "4.12";
+  ver_min = "0";
+in
+stdenv.mkDerivation rec {
+  name = "${p_name}-${ver_maj}.${ver_min}";
+
+  src = fetchurl {
+    url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "1jxmyp80pwbfgmqmwpjxs7z5dmm6pyf3qj62z20xy44izraadqz2";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ glib ];
+
+  # not needed to build it but to use it
+  propagatedBuildInputs = [ autoconf automake libtool intltool ];
+
+  meta = {
+    homepage = http://foo-projects.org/~benny/projects/xfce4-dev-tools/;
+    description = "Tools and M4 macros for Xfce4 developers";
+    license = stdenv.lib.licenses.gpl2Plus;
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
+
diff --git a/nixpkgs/pkgs/desktops/xfce/core/xfce4-light-locker.patch b/nixpkgs/pkgs/desktops/xfce/core/xfce4-light-locker.patch
new file mode 100644
index 000000000000..0fabdffd7ed6
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/xfce/core/xfce4-light-locker.patch
@@ -0,0 +1,25 @@
+--- ./scripts/xflock4.orig	2017-08-06 23:05:53.807688995 +0100
++++ ./scripts/xflock4	2017-08-06 23:09:06.171789989 +0100
+@@ -24,12 +24,19 @
+ PATH=/bin:/usr/bin
+ export PATH
+ 
+-# Lock by xscreensaver or gnome-screensaver, if a respective daemon is running
++# First test for the command set in the session's xfconf channel
++LOCK_CMD=$(xfconf-query -c xfce4-session -p /general/LockCommand)
++
++# Lock by xscreensaver, gnome-screensaver, or light-locker, if a respective daemon is running
+ for lock_cmd in \
++    "$LOCK_CMD" \
+     "xscreensaver-command -lock" \
+-    "gnome-screensaver-command --lock"
++    "gnome-screensaver-command --lock" \
++    "light-locker-command -l"
+ do
+-    $lock_cmd >/dev/null 2>&1 && exit
++    if [ ! -z "$lock_cmd" ]; then
++        $lock_cmd >/dev/null 2>&1 && exit
++    fi
+ done
+ 
+ # else run another access locking utility, if installed
diff --git a/nixpkgs/pkgs/desktops/xfce/core/xfce4-panel-datadir.patch b/nixpkgs/pkgs/desktops/xfce/core/xfce4-panel-datadir.patch
new file mode 100644
index 000000000000..ed9df9ef36f3
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/xfce/core/xfce4-panel-datadir.patch
@@ -0,0 +1,24 @@
+diff --git a/panel/panel-module-factory.c b/panel/panel-module-factory.c
+index 529fe85..8c792b7 100644
+--- a/panel/panel-module-factory.c
++++ b/panel/panel-module-factory.c
+@@ -39,6 +39,7 @@
+ #include <panel/panel-module.h>
+ #include <panel/panel-module-factory.h>
+ 
++#define DATADIR "/run/current-system/sw/share/xfce4"
+ #define PANEL_PLUGINS_DATA_DIR     (DATADIR G_DIR_SEPARATOR_S "panel" G_DIR_SEPARATOR_S "plugins")
+ #define PANEL_PLUGINS_DATA_DIR_OLD (DATADIR G_DIR_SEPARATOR_S "panel-plugins")
+ 
+diff --git a/panel/panel-module.c b/panel/panel-module.c
+index ba39320..519440b 100644
+--- a/panel/panel-module.c
++++ b/panel/panel-module.c
+@@ -35,6 +35,7 @@
+ #include <panel/panel-plugin-external-wrapper.h>
+ #include <panel/panel-plugin-external-46.h>
+ 
++#define LIBDIR "/run/current-system/sw/lib/xfce4"
+ #define PANEL_PLUGINS_LIB_DIR (LIBDIR G_DIR_SEPARATOR_S "panel" G_DIR_SEPARATOR_S "plugins")
+ #define PANEL_PLUGINS_LIB_DIR_OLD (LIBDIR G_DIR_SEPARATOR_S "panel-plugins")
+ 
diff --git a/nixpkgs/pkgs/desktops/xfce/core/xfce4-panel.nix b/nixpkgs/pkgs/desktops/xfce/core/xfce4-panel.nix
new file mode 100644
index 000000000000..d2d992d54a88
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/xfce/core/xfce4-panel.nix
@@ -0,0 +1,59 @@
+{ stdenv, fetchurl, pkgconfig, intltool, gtk, libxfce4util, libxfce4ui
+, libxfce4ui_gtk3, libwnck, exo, garcon, xfconf, libstartup_notification
+, makeWrapper, xfce4-mixer, hicolor-icon-theme, tzdata
+, withGtk3 ? false, gtk3, gettext, glib-networking
+}:
+let
+  inherit (stdenv.lib) optional;
+  p_name  = "xfce4-panel";
+  ver_maj = "4.12";
+  ver_min = "2";
+in
+stdenv.mkDerivation rec {
+  name = "${p_name}-${ver_maj}.${ver_min}";
+
+  src = fetchurl {
+    url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "1s8cvsrgmkmmm84g6mghpj2k4777gm22g5lrsf8pdy5qh6xql1a2";
+  };
+
+  patches = [ ./xfce4-panel-datadir.patch ];
+  patchFlags = "-p1";
+
+  postPatch = ''
+    for f in $(find . -name \*.sh); do
+      substituteInPlace $f --replace gettext ${gettext}/bin/gettext
+    done
+    substituteInPlace plugins/clock/clock.c \
+       --replace "/usr/share/zoneinfo" "${tzdata}/share/zoneinfo" \
+       --replace "if (!g_file_test (filename, G_FILE_TEST_IS_SYMLINK))" ""
+  '';
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  buildInputs =
+    [ pkgconfig intltool gtk libxfce4util exo libwnck
+      garcon xfconf libstartup_notification makeWrapper hicolor-icon-theme
+    ] ++ xfce4-mixer.gst_plugins
+      ++ optional withGtk3 gtk3;
+
+  propagatedBuildInputs = [ (if withGtk3 then libxfce4ui_gtk3 else libxfce4ui) ];
+
+  configureFlags = optional withGtk3 "--enable-gtk3";
+
+  postInstall = ''
+    wrapProgram "$out/bin/xfce4-panel" \
+      --prefix GST_PLUGIN_SYSTEM_PATH : "$GST_PLUGIN_SYSTEM_PATH" \
+      --prefix GIO_EXTRA_MODULES : "${glib-networking}/lib/gio/modules"
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    homepage = http://www.xfce.org/projects/xfce4-panel;
+    description = "Xfce panel";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.eelco ];
+  };
+}
diff --git a/nixpkgs/pkgs/desktops/xfce/core/xfce4-power-manager.nix b/nixpkgs/pkgs/desktops/xfce/core/xfce4-power-manager.nix
new file mode 100644
index 000000000000..ffcc67bf0e9b
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/xfce/core/xfce4-power-manager.nix
@@ -0,0 +1,45 @@
+{ stdenv, lib, fetchurl, pkgconfig, intltool, glib, gtk, dbus-glib, upower, xfconf
+, libxfce4ui, libxfce4util, libnotify, xfce4-panel, hicolor-icon-theme
+, withGtk3 ? false, gtk3, libxfce4ui_gtk3, xfce4panel_gtk3 }:
+let
+  p_name  = "xfce4-power-manager";
+  ver_maj = if withGtk3 then "1.6" else "1.4";
+  ver_min = if withGtk3 then "0"   else "4";
+in
+stdenv.mkDerivation rec {
+  name = "${p_name}-${ver_maj}.${ver_min}";
+
+  src = fetchurl {
+    url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 =
+      if withGtk3
+      then "0avzhllpimcn7a6z9aa4jn0zg5ahxr9ks5ldchizycdb0rz1bqxx"
+      else "01rvqy1cif4s8lkidb7hhmsz7d9f2fwcwvc51xycaj3qgsmch3n5";
+  };
+
+  buildInputs =
+    [ pkgconfig intltool glib dbus-glib upower xfconf libxfce4util
+      libnotify hicolor-icon-theme
+    ] ++
+    (if withGtk3
+    then [ gtk3 libxfce4ui_gtk3 xfce4panel_gtk3 ]
+    else [ gtk  libxfce4ui      xfce4-panel      ]);
+
+  postPatch = lib.optionalString withGtk3 ''
+    substituteInPlace configure --replace gio-2.0 gio-unix-2.0
+  '';
+
+  postConfigure = lib.optionalString withGtk3 ''
+    substituteInPlace src/Makefile      --replace "xfce4_power_manager_CFLAGS = "          "xfce4_power_manager_CFLAGS = \$(GIO_CFLAGS) "
+    substituteInPlace settings/Makefile --replace "xfce4_power_manager_settings_CFLAGS = " "xfce4_power_manager_settings_CFLAGS = \$(GIO_CFLAGS) "
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = http://goodies.xfce.org/projects/applications/xfce4-power-manager;
+    description = "A power manager for the Xfce Desktop Environment";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.eelco ];
+  };
+}
+
diff --git a/nixpkgs/pkgs/desktops/xfce/core/xfce4-session.nix b/nixpkgs/pkgs/desktops/xfce/core/xfce4-session.nix
new file mode 100644
index 000000000000..3f6237d6de17
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/xfce/core/xfce4-session.nix
@@ -0,0 +1,45 @@
+{ stdenv, fetchurl, pkgconfig, intltool, gtk, polkit
+, libxfce4util, libxfce4ui, xfce4-panel, libwnck, dbus-glib, xfconf, libglade, xorg
+, hicolor-icon-theme
+}:
+
+let
+  p_name  = "xfce4-session";
+  ver_maj = "4.12";
+  ver_min = "1";
+in
+stdenv.mkDerivation rec {
+  name = "${p_name}-${ver_maj}.${ver_min}";
+
+  src = fetchurl {
+    url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "97d7f2a2d0af7f3623b68d1f04091e02913b28f9555dab8b0d26c8a1299d08fd";
+  };
+
+  patches = [
+    # Fix "lock screen" not working for light-locker
+    ./xfce4-light-locker.patch
+  ];
+
+  buildInputs =
+    [ pkgconfig intltool gtk libxfce4util libxfce4ui libwnck dbus-glib
+      xfconf xfce4-panel libglade xorg.iceauth xorg.libSM
+      polkit hicolor-icon-theme
+    ]; #TODO: upower-glib, gconf (assistive?), gnome keyring
+
+  preBuild = ''
+    sed '/^PATH=/d'        -i scripts/xflock4
+    sed '/^export PATH$/d' -i scripts/xflock4
+  '';
+
+  configureFlags = [ "--with-xsession-prefix=$(out)" ];
+
+  meta = with stdenv.lib; {
+    homepage = http://www.xfce.org/projects/xfce4-session;
+    description = "Session manager for Xfce";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.eelco ];
+  };
+}
+
diff --git a/nixpkgs/pkgs/desktops/xfce/core/xfce4-settings-default-icon-theme.patch b/nixpkgs/pkgs/desktops/xfce/core/xfce4-settings-default-icon-theme.patch
new file mode 100644
index 000000000000..2683b3c3dfdd
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/xfce/core/xfce4-settings-default-icon-theme.patch
@@ -0,0 +1,11 @@
+--- a/xfsettingsd/xsettings.xml       2015-02-28 22:32:02.681796319 +0100
++++ b/xfsettingsd/xsettings.xml       2015-02-28 22:32:27.881214735 +0100
+@@ -7,7 +7,7 @@
+ <channel name="xsettings" version="1.0">
+   <property name="Net" type="empty">
+     <property name="ThemeName" type="empty"/>
+-    <property name="IconThemeName" type="empty"/>
++    <property name="IconThemeName" type="string" value="Rodent"/>
+     <property name="DoubleClickTime" type="int" value="400"/>
+     <property name="DoubleClickDistance" type="int" value="5"/>
+     <property name="DndDragThreshold" type="int" value="8"/>
\ No newline at end of file
diff --git a/nixpkgs/pkgs/desktops/xfce/core/xfce4-settings.nix b/nixpkgs/pkgs/desktops/xfce/core/xfce4-settings.nix
new file mode 100644
index 000000000000..592b03e8954a
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/xfce/core/xfce4-settings.nix
@@ -0,0 +1,54 @@
+{ stdenv, fetchurl, pkgconfig, intltool, exo, gtk, garcon, libxfce4util
+, libxfce4ui, xfconf, libXi, upower ? null, libnotify ? null
+, libXcursor ? null, xf86inputlibinput ? null, libxklavier ? null }:
+
+let
+  p_name  = "xfce4-settings";
+  ver_maj = "4.12";
+  ver_min = "1";
+in
+stdenv.mkDerivation rec {
+  name = "${p_name}-${ver_maj}.${ver_min}";
+
+  src = fetchurl {
+    url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "0x35i1cvkqp0hib1knwa58mckdwrfbhaisz4bsx6bbbx385llj7n";
+  };
+
+  patches = [ ./xfce4-settings-default-icon-theme.patch ];
+
+  postPatch = ''
+    for f in $(find . -name \*.c); do
+      substituteInPlace $f --replace \"libinput-properties.h\" '<xorg/libinput-properties.h>'
+    done
+  '';
+
+  nativeBuildInputs = [ pkgconfig intltool ];
+
+  buildInputs = [
+    exo
+    gtk
+    garcon
+    libxfce4util
+    libxfce4ui
+    xfconf
+    libXi
+    upower
+    libnotify
+    libXcursor
+    xf86inputlibinput
+    libxklavier
+  ];
+
+  configureFlags = [ "--enable-pluggable-dialogs" "--enable-sound-settings" ];
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    homepage = http://www.xfce.org/projects/xfce4-settings;
+    description = "Settings manager for Xfce";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.eelco ];
+  };
+}
diff --git a/nixpkgs/pkgs/desktops/xfce/core/xfconf.nix b/nixpkgs/pkgs/desktops/xfce/core/xfconf.nix
new file mode 100644
index 000000000000..9af365c6f14d
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/xfce/core/xfconf.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchurl, pkgconfig, intltool, glib, libxfce4util, dbus-glib }:
+let
+  p_name  = "xfconf";
+  ver_maj = "4.12";
+  ver_min = "1";
+in
+stdenv.mkDerivation rec {
+  name = "${p_name}-${ver_maj}.${ver_min}";
+
+  src = fetchurl {
+    url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "0dns190bwb615wy9ma2654sw4vz1d0rcv061zmaalkv9wmj8bx1m";
+  };
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  #TODO: no perl bingings yet (ExtUtils::Depends, ExtUtils::PkgConfig, Glib)
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ intltool glib libxfce4util ];
+  propagatedBuildInputs = [ dbus-glib ];
+
+  doCheck = false; # requires dbus daemon
+
+  meta = with stdenv.lib; {
+    homepage = http://docs.xfce.org/xfce/xfconf/start;
+    description = "Simple client-server configuration storage and query system for Xfce";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/desktops/xfce/core/xfdesktop.nix b/nixpkgs/pkgs/desktops/xfce/core/xfdesktop.nix
new file mode 100644
index 000000000000..48585b4004bb
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/xfce/core/xfdesktop.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchurl, fetchpatch, pkgconfig, intltool, gtk, libxfce4util, libxfce4ui
+, libwnck, xfconf, libglade, xfce4-panel, thunar, exo, garcon, libnotify
+, hicolor-icon-theme }:
+let
+  p_name  = "xfdesktop";
+  ver_maj = "4.12";
+  ver_min = "3";
+in
+stdenv.mkDerivation rec {
+  name = "${p_name}-${ver_maj}.${ver_min}";
+
+  src = fetchurl {
+    url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "a8a8d93744d842ca6ac1f9bd2c8789ee178937bca7e170e5239cbdbef30520ac";
+  };
+
+  buildInputs = [
+    pkgconfig intltool gtk libxfce4util libxfce4ui libwnck xfconf
+    libglade xfce4-panel thunar exo garcon libnotify hicolor-icon-theme
+  ];
+
+  patches = [(fetchpatch {
+    url = https://git.xfce.org/xfce/xfdesktop/patch?id=157f5b55cfc3629d595ef38984278de5915aac27;
+    sha256 = "0ki7hnyfpz7bdmsxqnm9qvyk040iyv1fawnhzfbyyzrh4nc5jd3x";
+  })];
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    homepage = http://www.xfce.org/projects/xfdesktop;
+    description = "Xfce desktop manager";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.eelco ];
+  };
+}
diff --git a/nixpkgs/pkgs/desktops/xfce/core/xfwm4.nix b/nixpkgs/pkgs/desktops/xfce/core/xfwm4.nix
new file mode 100644
index 000000000000..313a2662f039
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/xfce/core/xfwm4.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchurl, pkgconfig, gtk, intltool, libglade, libxfce4util
+, libxfce4ui, xfconf, libwnck, libstartup_notification, xorg }:
+let
+  p_name  = "xfwm4";
+  ver_maj = "4.12";
+  ver_min = "4";
+in
+stdenv.mkDerivation rec {
+  name = "${p_name}-${ver_maj}.${ver_min}";
+
+  src = fetchurl {
+    url = "mirror://xfce/src/xfce/${p_name}/${ver_maj}/${name}.tar.bz2";
+    sha256 = "0dpvdrd5lclkcrzmdpva38gfsgvdf3xkqfknvy96x6k4fn508x7s";
+  };
+
+  buildInputs =
+    [ pkgconfig intltool gtk libglade libxfce4util libxfce4ui xfconf
+      libwnck libstartup_notification
+      xorg.libXcomposite xorg.libXfixes xorg.libXdamage
+    ];
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    homepage = http://www.xfce.org/projects/xfwm4;
+    description = "Window manager for Xfce";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.eelco ];
+  };
+}
+