fuzzel: refactor dependencies
* Remove unnecessary dependencies, and add wayland-scanner for gluing wayland protocol XML files. * Added optional flags for cairo, png and svg support respectively and specify build type.
This commit is contained in:
parent
187760e07a
commit
1531e34bdf
|
@ -4,19 +4,28 @@
|
|||
, pkg-config
|
||||
, meson
|
||||
, ninja
|
||||
, wayland-scanner
|
||||
, wayland
|
||||
, pixman
|
||||
, cairo
|
||||
, librsvg
|
||||
, wayland-protocols
|
||||
, wlroots
|
||||
, libxkbcommon
|
||||
, scdoc
|
||||
, git
|
||||
, tllist
|
||||
, fcft
|
||||
, enableCairo ? true
|
||||
, enablePNG ? true
|
||||
, enableSVG ? true
|
||||
# Optional dependencies
|
||||
, cairo
|
||||
, librsvg
|
||||
, libpng
|
||||
}:
|
||||
|
||||
let
|
||||
# Courtesy of sternenseemann and FRidh, commit c9a7fdfcfb420be8e0179214d0d91a34f5974c54
|
||||
mesonFeatureFlag = opt: b: "-D${opt}=${if b then "enabled" else "disabled"}";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fuzzel";
|
||||
version = "1.6.1";
|
||||
|
@ -31,22 +40,29 @@ stdenv.mkDerivation rec {
|
|||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
wayland-scanner
|
||||
meson
|
||||
ninja
|
||||
scdoc
|
||||
git
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
wayland
|
||||
pixman
|
||||
cairo
|
||||
librsvg
|
||||
wayland-protocols
|
||||
wlroots
|
||||
libxkbcommon
|
||||
tllist
|
||||
fcft
|
||||
] ++ lib.optional enableCairo cairo
|
||||
++ lib.optional enablePNG libpng
|
||||
++ lib.optional enableSVG librsvg;
|
||||
|
||||
mesonBuildType = "release";
|
||||
|
||||
mesonFlags = [
|
||||
(mesonFeatureFlag "enable-cairo" enableCairo)
|
||||
(mesonFeatureFlag "enable-png" enablePNG)
|
||||
(mesonFeatureFlag "enable-svg" enableSVG)
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
|
|
Loading…
Reference in a new issue