Merge pull request #144068 from polykernel/fuzzel-combo-assertions-patch

fuzzel: refactor configure options
This commit is contained in:
Christian Kögler 2022-08-29 06:22:52 +02:00 committed by GitHub
commit 2b5e1bce52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,14 +13,16 @@
, tllist
, fcft
, enableCairo ? true
, withPNGBackend ? "libpng"
, withSVGBackend ? "librsvg"
# Optional dependencies
, svgSupport ? true
, pngSupport ? true
# Optional dependencies
, cairo
, librsvg
, libpng
}:
assert svgSupport -> enableCairo;
stdenv.mkDerivation rec {
pname = "fuzzel";
version = "1.7.0";
@ -49,19 +51,17 @@ stdenv.mkDerivation rec {
tllist
fcft
] ++ lib.optional enableCairo cairo
++ lib.optional (withPNGBackend == "libpng") libpng
++ lib.optional (withSVGBackend == "librsvg") librsvg;
++ lib.optional pngSupport libpng
++ lib.optional svgSupport librsvg;
mesonBuildType = "release";
mesonFlags = [
"-Denable-cairo=${if enableCairo then "enabled" else "disabled"}"
"-Dpng-backend=${withPNGBackend}"
"-Dsvg-backend=${withSVGBackend}"
"-Dpng-backend=${if pngSupport then "libpng" else "none"}"
"-Dsvg-backend=${if svgSupport then "librsvg" else "none"}"
];
CFLAGS = "-Wno-error=comment"; # https://gitlab.gnome.org/GNOME/librsvg/-/issues/856
meta = with lib; {
description = "Wayland-native application launcher, similar to rofis drun mode";
homepage = "https://codeberg.org/dnkl/fuzzel";