nixpkgs/pkgs/applications/window-managers/openbox/default.nix

47 lines
1.4 KiB
Nix
Raw Normal View History

2013-05-13 04:33:31 +02:00
{ stdenv, fetchurl, pkgconfig
, libxml2, libXinerama, libXcursor, libXau, libXrandr
2015-08-03 16:12:27 +02:00
, imlib2, pango, libstartup_notification, makeWrapper }:
stdenv.mkDerivation rec {
2016-03-12 01:18:58 +01:00
name = "openbox-${version}";
version = "3.6.1";
2013-05-13 04:33:31 +02:00
buildInputs = [
pkgconfig libxml2
libXinerama libXcursor libXau libXrandr
2015-08-03 16:12:27 +02:00
libstartup_notification makeWrapper
];
propagatedBuildInputs = [
pango imlib2
2013-05-13 04:33:31 +02:00
];
src = fetchurl {
2013-05-13 04:33:31 +02:00
url = "http://openbox.org/dist/openbox/${name}.tar.gz";
2015-09-29 10:10:31 +02:00
sha256 = "1xvyvqxlhy08n61rjkckmrzah2si1i7nmc7s8h07riqq01vc0jlb";
};
setlayoutSrc = fetchurl {
url = "http://openbox.org/dist/tools/setlayout.c";
sha256 = "1ci9lq4qqhl31yz1jwwjiawah0f7x0vx44ap8baw7r6rdi00pyiv";
};
postBuild = "gcc -O2 -o setlayout $(pkg-config --cflags --libs x11) $setlayoutSrc";
# Openbox needs XDG_DATA_DIRS set or it can't find its default theme
postInstall = ''
cp -a setlayout "$out"/bin
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/;
license = stdenv.lib.licenses.gpl2Plus;
2016-03-12 01:18:58 +01:00
platforms = stdenv.lib.platforms.linux;
};
}