diff --git a/pkgs/applications/window-managers/openbox/default.nix b/pkgs/applications/window-managers/openbox/default.nix index a4ec6d067dc..39329e8004c 100644 --- a/pkgs/applications/window-managers/openbox/default.nix +++ b/pkgs/applications/window-managers/openbox/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, python2 +{ stdenv, fetchurl, autoreconfHook, pkgconfig, python3 , libxml2, libXinerama, libXcursor, libXau, libXrandr, libICE, libSM , imlib2, pango, libstartup_notification, makeWrapper }: @@ -7,22 +7,24 @@ stdenv.mkDerivation rec { version = "3.6.1"; nativeBuildInputs = [ + autoreconfHook pkgconfig makeWrapper - python2.pkgs.wrapPython + python3.pkgs.wrapPython ]; buildInputs = [ libxml2 libXinerama libXcursor libXau libXrandr libICE libSM libstartup_notification + python3 ]; propagatedBuildInputs = [ pango imlib2 ]; - pythonPath = with python2.pkgs; [ + pythonPath = with python3.pkgs; [ pyxdg ]; @@ -36,6 +38,15 @@ stdenv.mkDerivation rec { sha256 = "1ci9lq4qqhl31yz1jwwjiawah0f7x0vx44ap8baw7r6rdi00pyiv"; }; + 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"; + }) + ]; + 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