From a7070743a30d608f93be859ffc87de6354ba97b5 Mon Sep 17 00:00:00 2001 From: Alexei Robyn Date: Sun, 23 Mar 2014 20:49:09 +1100 Subject: [PATCH] Openbox: Added wrapping for XDG_DATA_DIRS Fixes issue with Openbox failing to start due to not finding its default theme --- pkgs/applications/window-managers/openbox/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/window-managers/openbox/default.nix b/pkgs/applications/window-managers/openbox/default.nix index 487a8a5b387a..56a5f0e3e2ce 100644 --- a/pkgs/applications/window-managers/openbox/default.nix +++ b/pkgs/applications/window-managers/openbox/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, pkgconfig , libxml2, libXinerama, libXcursor, libXau, libXrandr -, imlib2, pango, libstartup_notification }: +, imlib2, pango, libstartup_notification, makeWrapper}: stdenv.mkDerivation rec { name = "openbox-3.5.2"; @@ -9,6 +9,7 @@ stdenv.mkDerivation rec { pkgconfig libxml2 libXinerama libXcursor libXau libXrandr imlib2 pango libstartup_notification + makeWrapper ]; src = fetchurl { @@ -16,6 +17,14 @@ stdenv.mkDerivation rec { sha256 = "0cxgb334zj6aszwiki9g10i56sm18i7w1kw52vdnwgzq27pv93qj"; }; + # Openbox needs XDG_DATA_DIRS set or it can't find its default theme + postInstall = '' + wrapProgram "$out/bin/openbox" --prefix XDG_DATA_DIRS : "$out/share" + wrapProgram "$out/bin/openbox-session" --prefix XDG_DATA_DIRS : "$out/share" + wrapProgram "$out/bin/openbox-gnome-session" --prefix XDG_DATA_DIRS : "$out/share" + wrapProgram "$out/bin/openbox-kde-session" --prefix XDG_DATA_DIRS : "$out/share" + ''; + meta = { description = "X window manager for non-desktop embedded systems"; homepage = http://openbox.org/;