diff --git a/pkgs/applications/misc/bemenu/default.nix b/pkgs/applications/misc/bemenu/default.nix index 665198b3d1f..8b17ecea3cb 100644 --- a/pkgs/applications/misc/bemenu/default.nix +++ b/pkgs/applications/misc/bemenu/default.nix @@ -1,32 +1,33 @@ -{ stdenv, fetchFromGitHub, cairo, cmake, libxkbcommon +{ stdenv, lib, fetchFromGitHub, cairo, libxkbcommon , pango, fribidi, harfbuzz, pcre, pkgconfig , ncursesSupport ? true, ncurses ? null -, waylandSupport ? true, wayland ? null +, waylandSupport ? true, wayland ? null, wayland-protocols ? null , x11Support ? true, xlibs ? null, xorg ? null }: assert ncursesSupport -> ncurses != null; -assert waylandSupport -> wayland != null; +assert waylandSupport -> ! lib.elem null [wayland wayland-protocols]; assert x11Support -> xlibs != null && xorg != null; stdenv.mkDerivation rec { pname = "bemenu"; - version = "0.3.0"; + version = "0.4.1"; src = fetchFromGitHub { owner = "Cloudef"; repo = pname; rev = version; - sha256 = "03k8wijdgj5nwmvgjhsrlh918n719789fhs4dqm23pd00rapxipk"; + sha256 = "1fjcs9d3533ay3nz79cx3c0lmy2chgragr2lhsy0xl2ckr0iins0"; }; - nativeBuildInputs = [ cmake pkgconfig pcre ]; + nativeBuildInputs = [ pkgconfig pcre ]; - cmakeFlags = [ - "-DBEMENU_CURSES_RENDERER=${if ncursesSupport then "ON" else "OFF"}" - "-DBEMENU_WAYLAND_RENDERER=${if waylandSupport then "ON" else "OFF"}" - "-DBEMENU_X11_RENDERER=${if x11Support then "ON" else "OFF"}" - ]; + makeFlags = ["PREFIX=$(out)"]; + + buildFlags = ["clients"] + ++ lib.optional ncursesSupport "curses" + ++ lib.optional waylandSupport "wayland" + ++ lib.optional x11Support "x11"; buildInputs = with stdenv.lib; [ cairo @@ -34,18 +35,18 @@ stdenv.mkDerivation rec { harfbuzz libxkbcommon pango - ] ++ optionals ncursesSupport [ ncurses ] - ++ optionals waylandSupport [ wayland ] + ] ++ optional ncursesSupport ncurses + ++ optionals waylandSupport [ wayland wayland-protocols ] ++ optionals x11Support [ xlibs.libX11 xlibs.libXinerama xlibs.libXft xorg.libXdmcp xorg.libpthreadstubs xorg.libxcb ]; - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://github.com/Cloudef/bemenu"; description = "Dynamic menu library and client program inspired by dmenu"; license = licenses.gpl3Plus; - maintainers = with maintainers; [ thiagokokada ]; + maintainers = with maintainers; [ lheckemann ]; platforms = with platforms; linux; }; }