Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
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 6, libiconv 7}: 8 9assert fontconfigSupport -> fontconfig != null; 10 11stdenv.mkDerivation rec { 12 pname = "libass"; 13 version = "0.17.1"; 14 15 src = fetchurl { 16 url = "https://github.com/libass/libass/releases/download/${version}/${pname}-${version}.tar.xz"; 17 sha256 = "sha256-8NoLv7pHbBauPhz9hiJW0wkVkR96uqGxbOYu5lMZJ4Q="; 18 }; 19 20 outputs = [ "out" "dev" ]; 21 22 configureFlags = [ 23 (lib.enableFeature fontconfigSupport "fontconfig") 24 (lib.enableFeature rasterizerSupport "rasterizer") 25 (lib.enableFeature largeTilesSupport "large-tiles") 26 ]; 27 28 nativeBuildInputs = [ pkg-config yasm ]; 29 30 buildInputs = [ freetype fribidi harfbuzz ] 31 ++ lib.optional fontconfigSupport fontconfig 32 ++ lib.optional stdenv.isDarwin libiconv; 33 34 meta = with lib; { 35 description = "Portable ASS/SSA subtitle renderer"; 36 homepage = "https://github.com/libass/libass"; 37 license = licenses.isc; 38 platforms = platforms.unix; 39 maintainers = with maintainers; [ codyopel ]; 40 }; 41}