1 { lib, stdenv, fetchurl, pkg-config, yasm
2 , freetype, fribidi, harfbuzz
3 , fontconfigSupport ? true, fontconfig ? null # fontconfig support
4 , rasterizerSupport ? false # Internal rasterizer
5 , largeTilesSupport ? false # Use larger tiles in the rasterizer
10 assert fontconfigSupport -> fontconfig != null;
12 stdenv.mkDerivation rec {
17 url = "https://github.com/libass/libass/releases/download/${version}/${pname}-${version}.tar.xz";
18 hash = "sha256-6uQl2lDwAVwh97OpxyYqkQ8CGK9GniLikxRi/tPFCVk=";
21 outputs = [ "out" "dev" ];
24 (lib.enableFeature fontconfigSupport "fontconfig")
25 (lib.enableFeature rasterizerSupport "rasterizer")
26 (lib.enableFeature largeTilesSupport "large-tiles")
29 nativeBuildInputs = [ pkg-config yasm ];
31 buildInputs = [ freetype fribidi harfbuzz ]
32 ++ lib.optional fontconfigSupport fontconfig
33 ++ lib.optional stdenv.hostPlatform.isDarwin [
35 darwin.apple_sdk.frameworks.ApplicationServices
36 darwin.apple_sdk.frameworks.CoreFoundation
37 darwin.apple_sdk.frameworks.CoreText
41 description = "Portable ASS/SSA subtitle renderer";
42 homepage = "https://github.com/libass/libass";
43 license = licenses.isc;
44 platforms = platforms.unix;
45 maintainers = with maintainers; [ codyopel ];