2014-03-02 04:21:50 +00:00
|
|
|
{ stdenv, fetchurl, pkgconfig, yasm
|
2015-05-31 23:47:59 +00:00
|
|
|
, freetype, fribidi
|
2015-02-09 15:27:10 +00:00
|
|
|
, encaSupport ? true, enca ? null # enca support
|
|
|
|
, fontconfigSupport ? true, fontconfig ? null # fontconfig support
|
|
|
|
, harfbuzzSupport ? true, harfbuzz ? null # harfbuzz support
|
|
|
|
, rasterizerSupport ? false # Internal rasterizer
|
|
|
|
, largeTilesSupport ? false # Use larger tiles in the rasterizer
|
2016-05-12 05:50:13 +00:00
|
|
|
, libiconv
|
2014-03-02 04:21:50 +00:00
|
|
|
}:
|
2011-02-09 21:10:42 +00:00
|
|
|
|
2015-05-31 23:47:59 +00:00
|
|
|
assert encaSupport -> enca != null;
|
|
|
|
assert fontconfigSupport -> fontconfig != null;
|
|
|
|
assert harfbuzzSupport -> harfbuzz != null;
|
2015-02-09 15:27:10 +00:00
|
|
|
|
2015-06-01 19:29:47 +00: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 {
|
2014-03-02 04:21:50 +00:00
|
|
|
name = "libass-${version}";
|
2016-04-13 01:30:17 +00:00
|
|
|
version = "0.13.2";
|
2011-02-09 21:10:42 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-02-09 15:27:10 +00:00
|
|
|
url = "https://github.com/libass/libass/releases/download/${version}/${name}.tar.xz";
|
2016-04-13 01:30:17 +00:00
|
|
|
sha256 = "1kpsw4zw95v4cjvild9wpk73dzavn1khsm3bm32kcz6amnkd166n";
|
2011-02-09 21:10:42 +00:00
|
|
|
};
|
|
|
|
|
2015-02-09 15:27:10 +00:00
|
|
|
configureFlags = [
|
2015-06-01 19:29:47 +00:00
|
|
|
(mkFlag encaSupport "enca")
|
|
|
|
(mkFlag fontconfigSupport "fontconfig")
|
|
|
|
(mkFlag harfbuzzSupport "harfbuzz")
|
|
|
|
(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 ];
|
|
|
|
|
2015-02-09 15:27:10 +00:00
|
|
|
buildInputs = [ freetype fribidi ]
|
|
|
|
++ optional encaSupport enca
|
|
|
|
++ optional fontconfigSupport fontconfig
|
2016-05-12 05:50:13 +00:00
|
|
|
++ optional harfbuzzSupport harfbuzz
|
|
|
|
++ 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";
|
2015-02-09 15:27:10 +00:00
|
|
|
homepage = https://github.com/libass/libass;
|
|
|
|
license = licenses.isc;
|
2015-02-28 15:11:23 +00:00
|
|
|
platforms = platforms.unix;
|
2015-02-09 15:27:10 +00:00
|
|
|
maintainers = with maintainers; [ codyopel urkud ];
|
2014-03-02 04:21:50 +00:00
|
|
|
repositories.git = git://github.com/libass/libass.git;
|
2011-02-09 21:10:42 +00:00
|
|
|
};
|
|
|
|
}
|