2020-05-11 12:18:43 +02:00
|
|
|
{ stdenv, lib, fetchFromGitHub, cairo, libxkbcommon
|
2021-01-17 03:09:27 +01:00
|
|
|
, pango, fribidi, harfbuzz, pcre, pkg-config
|
2019-05-02 00:04:38 +02:00
|
|
|
, ncursesSupport ? true, ncurses ? null
|
2020-05-11 12:18:43 +02:00
|
|
|
, waylandSupport ? true, wayland ? null, wayland-protocols ? null
|
2021-03-16 19:16:31 +01:00
|
|
|
, x11Support ? true, xorg ? null
|
2019-05-02 00:04:38 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert ncursesSupport -> ncurses != null;
|
2020-05-11 12:18:43 +02:00
|
|
|
assert waylandSupport -> ! lib.elem null [wayland wayland-protocols];
|
2021-03-16 19:16:31 +01:00
|
|
|
assert x11Support -> xorg != null;
|
2019-05-02 00:04:38 +02:00
|
|
|
|
2019-12-29 22:11:42 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-05-02 00:04:38 +02:00
|
|
|
pname = "bemenu";
|
2021-06-09 04:28:20 +02:00
|
|
|
version = "0.6.2";
|
2019-05-02 00:04:38 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Cloudef";
|
2019-12-29 22:11:42 +01:00
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-06-09 04:28:20 +02:00
|
|
|
sha256 = "sha256-2xmi/Mh5iU50yc2R1x1yzP8Xaz+mUgLnH73tAeLwxI8=";
|
2019-05-02 00:04:38 +02:00
|
|
|
};
|
|
|
|
|
2021-01-17 03:09:27 +01:00
|
|
|
nativeBuildInputs = [ pkg-config pcre ];
|
2019-05-02 00:04:38 +02:00
|
|
|
|
2020-05-11 12:18:43 +02:00
|
|
|
makeFlags = ["PREFIX=$(out)"];
|
|
|
|
|
|
|
|
buildFlags = ["clients"]
|
|
|
|
++ lib.optional ncursesSupport "curses"
|
|
|
|
++ lib.optional waylandSupport "wayland"
|
|
|
|
++ lib.optional x11Support "x11";
|
2019-12-29 22:11:42 +01:00
|
|
|
|
2021-01-15 06:42:41 +01:00
|
|
|
buildInputs = with lib; [
|
2019-05-02 00:04:38 +02:00
|
|
|
cairo
|
|
|
|
fribidi
|
|
|
|
harfbuzz
|
|
|
|
libxkbcommon
|
|
|
|
pango
|
2020-05-11 12:18:43 +02:00
|
|
|
] ++ optional ncursesSupport ncurses
|
|
|
|
++ optionals waylandSupport [ wayland wayland-protocols ]
|
2019-05-02 00:04:38 +02:00
|
|
|
++ optionals x11Support [
|
2021-03-16 19:16:31 +01:00
|
|
|
xorg.libX11 xorg.libXinerama xorg.libXft
|
2019-05-02 00:04:38 +02:00
|
|
|
xorg.libXdmcp xorg.libpthreadstubs xorg.libxcb
|
|
|
|
];
|
|
|
|
|
2020-05-11 12:18:43 +02:00
|
|
|
meta = with lib; {
|
2019-05-02 00:04:38 +02:00
|
|
|
homepage = "https://github.com/Cloudef/bemenu";
|
|
|
|
description = "Dynamic menu library and client program inspired by dmenu";
|
|
|
|
license = licenses.gpl3Plus;
|
2020-05-11 17:39:26 +02:00
|
|
|
maintainers = with maintainers; [ lheckemann ];
|
2019-05-02 00:04:38 +02:00
|
|
|
platforms = with platforms; linux;
|
|
|
|
};
|
|
|
|
}
|