base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / li / libass / package.nix
blobdb5603ac4aea11b9a5b08ff5bf439553ef96d767
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 , darwin
8 }:
10 assert fontconfigSupport -> fontconfig != null;
12 stdenv.mkDerivation rec {
13   pname = "libass";
14   version = "0.17.3";
16   src = fetchurl {
17     url = "https://github.com/libass/libass/releases/download/${version}/${pname}-${version}.tar.xz";
18     hash = "sha256-6uQl2lDwAVwh97OpxyYqkQ8CGK9GniLikxRi/tPFCVk=";
19   };
21   outputs = [ "out" "dev" ];
23   configureFlags = [
24     (lib.enableFeature fontconfigSupport "fontconfig")
25     (lib.enableFeature rasterizerSupport "rasterizer")
26     (lib.enableFeature largeTilesSupport "large-tiles")
27   ];
29   nativeBuildInputs = [ pkg-config yasm ];
31   buildInputs = [ freetype fribidi harfbuzz ]
32     ++ lib.optional fontconfigSupport fontconfig
33     ++ lib.optional stdenv.hostPlatform.isDarwin [
34       libiconv
35       darwin.apple_sdk.frameworks.ApplicationServices
36       darwin.apple_sdk.frameworks.CoreFoundation
37       darwin.apple_sdk.frameworks.CoreText
38     ];
40   meta = with lib; {
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 ];
46   };