libass: replace mkFlag with lib.enableFeature

This commit is contained in:
Pavol Rusnak 2022-06-29 21:32:50 +02:00
parent 54ed2aa8c1
commit 9d1b0d95e8
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -8,10 +8,6 @@
assert fontconfigSupport -> fontconfig != null;
let
mkFlag = optSet: flag: if optSet then "--enable-${flag}" else "--disable-${flag}";
in
with lib;
stdenv.mkDerivation rec {
pname = "libass";
@ -23,9 +19,9 @@ stdenv.mkDerivation rec {
};
configureFlags = [
(mkFlag fontconfigSupport "fontconfig")
(mkFlag rasterizerSupport "rasterizer")
(mkFlag largeTilesSupport "large-tiles")
(enableFeature fontconfigSupport "fontconfig")
(enableFeature rasterizerSupport "rasterizer")
(enableFeature largeTilesSupport "large-tiles")
];
nativeBuildInputs = [ pkg-config yasm ];