2014-03-02 04:21:50 +00:00
|
|
|
{ stdenv, fetchurl, pkgconfig, yasm
|
2020-10-28 19:45:57 +00:00
|
|
|
, freetype, fribidi, harfbuzz
|
2015-02-09 15:27:10 +00:00
|
|
|
, encaSupport ? true, enca ? null # enca support
|
|
|
|
, fontconfigSupport ? true, fontconfig ? null # fontconfig support
|
|
|
|
, rasterizerSupport ? false # Internal rasterizer
|
|
|
|
, largeTilesSupport ? false # Use larger tiles in the rasterizer
|
2016-05-12 06:50:13 +01:00
|
|
|
, libiconv
|
2014-03-02 04:21:50 +00:00
|
|
|
}:
|
2011-02-09 21:10:42 +00:00
|
|
|
|
2015-06-01 00:47:59 +01:00
|
|
|
assert encaSupport -> enca != null;
|
|
|
|
assert fontconfigSupport -> fontconfig != null;
|
2015-02-09 15:27:10 +00:00
|
|
|
|
2015-06-01 20:29:47 +01:00
|
|
|
let
|
|
|
|
mkFlag = optSet: flag: if optSet then "--enable-${flag}" else "--disable-${flag}";
|
|
|
|
in
|
|
|
|
|
2015-02-09 15:27:10 +00:00
|
|
|
with stdenv.lib;
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "libass";
|
2020-10-28 19:45:57 +00:00
|
|
|
version = "0.15.0";
|
2011-02-09 21:10:42 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "https://github.com/libass/libass/releases/download/${version}/${pname}-${version}.tar.xz";
|
2020-10-28 19:45:57 +00:00
|
|
|
sha256 = "0cz8v6kh3f2j5rdjrra2z0h715fa16vjm7kambvqx9hak86262cz";
|
2011-02-09 21:10:42 +00:00
|
|
|
};
|
|
|
|
|
2015-02-09 15:27:10 +00:00
|
|
|
configureFlags = [
|
2015-06-01 20:29:47 +01:00
|
|
|
(mkFlag encaSupport "enca")
|
|
|
|
(mkFlag fontconfigSupport "fontconfig")
|
|
|
|
(mkFlag rasterizerSupport "rasterizer")
|
|
|
|
(mkFlag largeTilesSupport "large-tiles")
|
2015-02-09 15:27:10 +00:00
|
|
|
];
|
|
|
|
|
2014-03-02 04:21:50 +00:00
|
|
|
nativeBuildInputs = [ pkgconfig yasm ];
|
|
|
|
|
2020-10-28 19:45:57 +00:00
|
|
|
buildInputs = [ freetype fribidi harfbuzz ]
|
2015-02-09 15:27:10 +00:00
|
|
|
++ optional encaSupport enca
|
|
|
|
++ optional fontconfigSupport fontconfig
|
2016-05-12 06:50:13 +01:00
|
|
|
++ optional stdenv.isDarwin libiconv;
|
2011-02-09 21:10:42 +00:00
|
|
|
|
|
|
|
meta = {
|
2014-03-02 04:21:50 +00:00
|
|
|
description = "Portable ASS/SSA subtitle renderer";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/libass/libass";
|
2015-02-09 15:27:10 +00:00
|
|
|
license = licenses.isc;
|
2015-02-28 15:11:23 +00:00
|
|
|
platforms = platforms.unix;
|
2017-03-27 18:11:17 +01:00
|
|
|
maintainers = with maintainers; [ codyopel ];
|
2020-04-01 02:11:51 +01:00
|
|
|
repositories.git = "git://github.com/libass/libass.git";
|
2011-02-09 21:10:42 +00:00
|
|
|
};
|
|
|
|
}
|