2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config, yasm
|
2020-11-19 00:13:47 +00:00
|
|
|
, freetype, fribidi, harfbuzz
|
2020-04-24 23:36:52 +00:00
|
|
|
, fontconfigSupport ? true, fontconfig ? null # fontconfig support
|
|
|
|
, rasterizerSupport ? false # Internal rasterizer
|
|
|
|
, largeTilesSupport ? false # Use larger tiles in the rasterizer
|
|
|
|
, libiconv
|
|
|
|
}:
|
|
|
|
|
|
|
|
assert fontconfigSupport -> fontconfig != null;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
with lib;
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libass";
|
2022-08-21 13:32:41 +00:00
|
|
|
version = "0.16.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/libass/libass/releases/download/${version}/${pname}-${version}.tar.xz";
|
2022-08-21 13:32:41 +00:00
|
|
|
sha256 = "sha256-Xb3p4iM5EZz47tWe6mxiOgdG71qQtonmigkBCQeOPAg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
configureFlags = [
|
2022-08-12 12:06:08 +00:00
|
|
|
(enableFeature fontconfigSupport "fontconfig")
|
|
|
|
(enableFeature rasterizerSupport "rasterizer")
|
|
|
|
(enableFeature largeTilesSupport "large-tiles")
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config yasm ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-19 00:13:47 +00:00
|
|
|
buildInputs = [ freetype fribidi harfbuzz ]
|
2020-04-24 23:36:52 +00:00
|
|
|
++ optional fontconfigSupport fontconfig
|
|
|
|
++ optional stdenv.isDarwin libiconv;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Portable ASS/SSA subtitle renderer";
|
|
|
|
homepage = "https://github.com/libass/libass";
|
|
|
|
license = licenses.isc;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ codyopel ];
|
|
|
|
};
|
|
|
|
}
|