1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-15 00:54:46 +00:00
nixpkgs/pkgs/applications/misc/bemenu/default.nix

53 lines
1.5 KiB
Nix
Raw Normal View History

2020-05-11 11:18:43 +01:00
{ stdenv, lib, fetchFromGitHub, cairo, libxkbcommon
, pango, fribidi, harfbuzz, pcre, pkg-config
, ncursesSupport ? true, ncurses ? null
2020-05-11 11:18:43 +01:00
, waylandSupport ? true, wayland ? null, wayland-protocols ? null
, x11Support ? true, xlibs ? null, xorg ? null
}:
assert ncursesSupport -> ncurses != null;
2020-05-11 11:18:43 +01:00
assert waylandSupport -> ! lib.elem null [wayland wayland-protocols];
assert x11Support -> xlibs != null && xorg != null;
stdenv.mkDerivation rec {
pname = "bemenu";
2020-08-25 11:11:54 +01:00
version = "0.5.0";
src = fetchFromGitHub {
owner = "Cloudef";
repo = pname;
rev = version;
2020-08-25 11:11:54 +01:00
sha256 = "1ifq5bk7782b9m6bl111x33fn38rpppdrww7hfavqia9a9gi2sl5";
};
nativeBuildInputs = [ pkg-config pcre ];
2020-05-11 11:18:43 +01:00
makeFlags = ["PREFIX=$(out)"];
buildFlags = ["clients"]
++ lib.optional ncursesSupport "curses"
++ lib.optional waylandSupport "wayland"
++ lib.optional x11Support "x11";
2021-01-15 05:42:41 +00:00
buildInputs = with lib; [
cairo
fribidi
harfbuzz
libxkbcommon
pango
2020-05-11 11:18:43 +01:00
] ++ optional ncursesSupport ncurses
++ optionals waylandSupport [ wayland wayland-protocols ]
++ optionals x11Support [
xlibs.libX11 xlibs.libXinerama xlibs.libXft
xorg.libXdmcp xorg.libpthreadstubs xorg.libxcb
];
2020-05-11 11:18:43 +01: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;
};
}