2020-05-17 01:19:18 +01:00
|
|
|
{ stdenv, fetchurl, autoreconfHook, pkgconfig, python3
|
2017-02-16 08:05:11 +00:00
|
|
|
, libxml2, libXinerama, libXcursor, libXau, libXrandr, libICE, libSM
|
2015-08-03 15:12:27 +01:00
|
|
|
, imlib2, pango, libstartup_notification, makeWrapper }:
|
2010-11-28 10:07:49 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "openbox";
|
2016-03-12 00:18:58 +00:00
|
|
|
version = "3.6.1";
|
2010-11-28 10:07:49 +00:00
|
|
|
|
2018-05-24 01:09:54 +01:00
|
|
|
nativeBuildInputs = [
|
2020-05-17 01:19:18 +01:00
|
|
|
autoreconfHook
|
2018-05-24 01:09:54 +01:00
|
|
|
pkgconfig
|
|
|
|
makeWrapper
|
2020-05-17 01:19:18 +01:00
|
|
|
python3.pkgs.wrapPython
|
2017-02-16 08:05:11 +00:00
|
|
|
];
|
|
|
|
|
2018-05-24 01:09:54 +01:00
|
|
|
buildInputs = [
|
|
|
|
libxml2
|
|
|
|
libXinerama libXcursor libXau libXrandr libICE libSM
|
|
|
|
libstartup_notification
|
2020-05-17 01:19:18 +01:00
|
|
|
python3
|
2015-08-03 15:12:27 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
pango imlib2
|
2013-05-13 03:33:31 +01:00
|
|
|
];
|
2010-11-28 10:07:49 +00:00
|
|
|
|
2020-05-17 01:19:18 +01:00
|
|
|
pythonPath = with python3.pkgs; [
|
2018-05-24 01:09:54 +01:00
|
|
|
pyxdg
|
|
|
|
];
|
|
|
|
|
2010-11-28 10:07:49 +00:00
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "http://openbox.org/dist/openbox/${pname}-${version}.tar.gz";
|
2015-09-29 09:10:31 +01:00
|
|
|
sha256 = "1xvyvqxlhy08n61rjkckmrzah2si1i7nmc7s8h07riqq01vc0jlb";
|
2010-11-28 10:07:49 +00:00
|
|
|
};
|
|
|
|
|
2014-09-15 12:40:41 +01:00
|
|
|
setlayoutSrc = fetchurl {
|
|
|
|
url = "http://openbox.org/dist/tools/setlayout.c";
|
|
|
|
sha256 = "1ci9lq4qqhl31yz1jwwjiawah0f7x0vx44ap8baw7r6rdi00pyiv";
|
|
|
|
};
|
|
|
|
|
2020-05-17 01:19:18 +01:00
|
|
|
patches = [
|
|
|
|
# Use fetchurl to avoid "fetchpatch: ignores file renames" #32084
|
|
|
|
# This patch adds python3 support
|
|
|
|
(fetchurl {
|
|
|
|
url = "https://git.archlinux.org/svntogit/community.git/plain/openbox/trunk/py3.patch?id=90cb57ef53d952bb6ab4c33a184f815bbe1791c0";
|
|
|
|
sha256 = "1ks99awlkhd5ph9kz94s1r6m1bfvh42g4rmxd14dyg5b421p1ljc";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2014-09-15 12:40:41 +01:00
|
|
|
postBuild = "gcc -O2 -o setlayout $(pkg-config --cflags --libs x11) $setlayoutSrc";
|
|
|
|
|
2014-03-23 09:49:09 +00:00
|
|
|
# Openbox needs XDG_DATA_DIRS set or it can't find its default theme
|
|
|
|
postInstall = ''
|
2014-09-15 12:40:41 +01:00
|
|
|
cp -a setlayout "$out"/bin
|
2014-03-23 09:49:09 +00:00
|
|
|
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"
|
2018-05-24 01:09:54 +01:00
|
|
|
wrapPythonProgramsIn "$out/libexec" "$out $pythonPath"
|
2017-02-16 08:05:11 +00:00
|
|
|
'';
|
2014-03-23 09:49:09 +00:00
|
|
|
|
2010-11-28 10:07:49 +00:00
|
|
|
meta = {
|
|
|
|
description = "X window manager for non-desktop embedded systems";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://openbox.org/";
|
2014-06-19 05:19:00 +01:00
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
2016-03-12 00:18:58 +00:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2010-11-28 10:07:49 +00:00
|
|
|
};
|
|
|
|
}
|