2021-12-06 16:07:01 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, fetchpatch, cairo, libxkbcommon
|
2021-02-05 17:12:51 +00:00
|
|
|
, pango, fribidi, harfbuzz, pcre, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, ncursesSupport ? true, ncurses ? null
|
2020-05-15 21:57:56 +00:00
|
|
|
, waylandSupport ? true, wayland ? null, wayland-protocols ? null
|
2021-03-19 17:17:44 +00:00
|
|
|
, x11Support ? true, xorg ? null
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert ncursesSupport -> ncurses != null;
|
2020-05-15 21:57:56 +00:00
|
|
|
assert waylandSupport -> ! lib.elem null [wayland wayland-protocols];
|
2021-03-19 17:17:44 +00:00
|
|
|
assert x11Support -> xorg != null;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "bemenu";
|
2021-07-24 12:14:16 +00:00
|
|
|
version = "0.6.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Cloudef";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-07-24 12:14:16 +00:00
|
|
|
sha256 = "sha256-U4IMfDvQ0rfEJhE3Uext2c/Cs0mjy1tw+k8uk441Ag8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
patches = [
|
|
|
|
# Pull upstream fix for build against ncurses-6.3
|
|
|
|
(fetchpatch {
|
|
|
|
name = "ncurses-6.3.patch";
|
|
|
|
url = "https://github.com/Cloudef/bemenu/commit/d31164db756989579468946aba62969e42c7ed28.patch";
|
|
|
|
sha256 = "sha256-oyndQI7SaR8cK0IO5wIIxMpmakhfUzwUqLIKRbPkEdw=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config pcre ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
makeFlags = ["PREFIX=$(out)"];
|
|
|
|
|
|
|
|
buildFlags = ["clients"]
|
|
|
|
++ lib.optional ncursesSupport "curses"
|
|
|
|
++ lib.optional waylandSupport "wayland"
|
|
|
|
++ lib.optional x11Support "x11";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
buildInputs = with lib; [
|
2020-04-24 23:36:52 +00:00
|
|
|
cairo
|
|
|
|
fribidi
|
|
|
|
harfbuzz
|
|
|
|
libxkbcommon
|
|
|
|
pango
|
2020-05-15 21:57:56 +00:00
|
|
|
] ++ optional ncursesSupport ncurses
|
|
|
|
++ optionals waylandSupport [ wayland wayland-protocols ]
|
2020-04-24 23:36:52 +00:00
|
|
|
++ optionals x11Support [
|
2021-03-19 17:17:44 +00:00
|
|
|
xorg.libX11 xorg.libXinerama xorg.libXft
|
2020-04-24 23:36:52 +00:00
|
|
|
xorg.libXdmcp xorg.libpthreadstubs xorg.libxcb
|
|
|
|
];
|
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/Cloudef/bemenu";
|
|
|
|
description = "Dynamic menu library and client program inspired by dmenu";
|
|
|
|
license = licenses.gpl3Plus;
|
2020-05-15 21:57:56 +00:00
|
|
|
maintainers = with maintainers; [ lheckemann ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = with platforms; linux;
|
|
|
|
};
|
|
|
|
}
|