wbg: use lib.mesonEnable

This commit is contained in:
Sandro Jäckel 2022-12-07 22:44:21 +01:00
parent 6821ff041a
commit 939606a99c
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5

View File

@ -16,12 +16,6 @@
, libjpeg
}:
let
# Courtesy of sternenseemann and FRidh, commit c9a7fdfcfb420be8e0179214d0d91a34f5974c54
mesonFeatureFlag = feature: flag:
"-D${feature}=${if flag then "enabled" else "disabled"}";
in
stdenv.mkDerivation rec {
pname = "wbg";
version = "1.0.2";
@ -52,8 +46,8 @@ stdenv.mkDerivation rec {
mesonBuildType = "release";
mesonFlags = [
(mesonFeatureFlag "png" enablePNG)
(mesonFeatureFlag "jpeg" enableJPEG)
(lib.mesonEnable "png" enablePNG)
(lib.mesonEnable "jpeg" enableJPEG)
];
meta = with lib; {