mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-27 16:15:05 +00:00
40 lines
1.2 KiB
Nix
40 lines
1.2 KiB
Nix
{ lib, stdenv, fetchurl, pkg-config, yasm
|
|
, freetype, fribidi, harfbuzz
|
|
, fontconfigSupport ? true, fontconfig ? null # fontconfig support
|
|
, rasterizerSupport ? false # Internal rasterizer
|
|
, largeTilesSupport ? false # Use larger tiles in the rasterizer
|
|
, libiconv
|
|
}:
|
|
|
|
assert fontconfigSupport -> fontconfig != null;
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "libass";
|
|
version = "0.16.0";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/libass/libass/releases/download/${version}/${pname}-${version}.tar.xz";
|
|
sha256 = "sha256-Xb3p4iM5EZz47tWe6mxiOgdG71qQtonmigkBCQeOPAg=";
|
|
};
|
|
|
|
configureFlags = [
|
|
(lib.enableFeature fontconfigSupport "fontconfig")
|
|
(lib.enableFeature rasterizerSupport "rasterizer")
|
|
(lib.enableFeature largeTilesSupport "large-tiles")
|
|
];
|
|
|
|
nativeBuildInputs = [ pkg-config yasm ];
|
|
|
|
buildInputs = [ freetype fribidi harfbuzz ]
|
|
++ lib.optional fontconfigSupport fontconfig
|
|
++ lib.optional stdenv.isDarwin libiconv;
|
|
|
|
meta = with lib; {
|
|
description = "Portable ASS/SSA subtitle renderer";
|
|
homepage = "https://github.com/libass/libass";
|
|
license = licenses.isc;
|
|
platforms = platforms.unix;
|
|
maintainers = with maintainers; [ codyopel ];
|
|
};
|
|
}
|