nixpkgs/pkgs/applications/misc/bemenu/default.nix

53 lines
1.4 KiB
Nix
Raw Normal View History

2020-05-11 12:18:43 +02:00
{ stdenv, lib, fetchFromGitHub, cairo, libxkbcommon
, pango, fribidi, harfbuzz, pcre, pkg-config
, ncursesSupport ? true, ncurses ? null
2020-05-11 12:18:43 +02:00
, waylandSupport ? true, wayland ? null, wayland-protocols ? null
, x11Support ? true, xorg ? null
}:
assert ncursesSupport -> ncurses != null;
2020-05-11 12:18:43 +02:00
assert waylandSupport -> ! lib.elem null [wayland wayland-protocols];
assert x11Support -> xorg != null;
stdenv.mkDerivation rec {
pname = "bemenu";
2021-06-09 04:28:20 +02:00
version = "0.6.2";
src = fetchFromGitHub {
owner = "Cloudef";
repo = pname;
rev = version;
2021-06-09 04:28:20 +02:00
sha256 = "sha256-2xmi/Mh5iU50yc2R1x1yzP8Xaz+mUgLnH73tAeLwxI8=";
};
nativeBuildInputs = [ pkg-config pcre ];
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";
2021-01-15 06:42:41 +01:00
buildInputs = with lib; [
cairo
fribidi
harfbuzz
libxkbcommon
pango
2020-05-11 12:18:43 +02:00
] ++ optional ncursesSupport ncurses
++ optionals waylandSupport [ wayland wayland-protocols ]
++ optionals x11Support [
xorg.libX11 xorg.libXinerama xorg.libXft
xorg.libXdmcp xorg.libpthreadstubs xorg.libxcb
];
2020-05-11 12:18:43 +02:00
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; [ lheckemann ];
platforms = with platforms; linux;
};
}