2021-01-21 09:00:13 -08:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config, yasm
|
2020-10-28 12:45:57 -07:00
|
|
|
, freetype, fribidi, harfbuzz
|
2015-02-09 07:27:10 -08: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-11 22:50:13 -07:00
|
|
|
, libiconv
|
2014-03-01 20:21:50 -08:00
|
|
|
}:
|
2011-02-09 13:10:42 -08:00
|
|
|
|
2015-05-31 16:47:59 -07:00
|
|
|
assert encaSupport -> enca != null;
|
|
|
|
assert fontconfigSupport -> fontconfig != null;
|
2015-02-09 07:27:10 -08:00
|
|
|
|
2015-06-01 12:29:47 -07:00
|
|
|
let
|
|
|
|
mkFlag = optSet: flag: if optSet then "--enable-${flag}" else "--disable-${flag}";
|
|
|
|
in
|
|
|
|
|
2021-01-21 09:00:13 -08:00
|
|
|
with lib;
|
2015-02-09 07:27:10 -08:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 05:41:18 -07:00
|
|
|
pname = "libass";
|
2021-05-02 22:13:09 -07:00
|
|
|
version = "0.15.1";
|
2011-02-09 13:10:42 -08:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 05:41:18 -07:00
|
|
|
url = "https://github.com/libass/libass/releases/download/${version}/${pname}-${version}.tar.xz";
|
2021-05-02 22:13:09 -07:00
|
|
|
sha256 = "sha256-HN05ydAHsG5zfnc4AE1/OM+bHpKEPzcweyTn/2OrjlM=";
|
2011-02-09 13:10:42 -08:00
|
|
|
};
|
|
|
|
|
2015-02-09 07:27:10 -08:00
|
|
|
configureFlags = [
|
2015-06-01 12:29:47 -07:00
|
|
|
(mkFlag encaSupport "enca")
|
|
|
|
(mkFlag fontconfigSupport "fontconfig")
|
|
|
|
(mkFlag rasterizerSupport "rasterizer")
|
|
|
|
(mkFlag largeTilesSupport "large-tiles")
|
2015-02-09 07:27:10 -08:00
|
|
|
];
|
|
|
|
|
2021-01-18 22:50:56 -08:00
|
|
|
nativeBuildInputs = [ pkg-config yasm ];
|
2014-03-01 20:21:50 -08:00
|
|
|
|
2020-10-28 12:45:57 -07:00
|
|
|
buildInputs = [ freetype fribidi harfbuzz ]
|
2015-02-09 07:27:10 -08:00
|
|
|
++ optional encaSupport enca
|
|
|
|
++ optional fontconfigSupport fontconfig
|
2016-05-11 22:50:13 -07:00
|
|
|
++ optional stdenv.isDarwin libiconv;
|
2011-02-09 13:10:42 -08:00
|
|
|
|
|
|
|
meta = {
|
2014-03-01 20:21:50 -08:00
|
|
|
description = "Portable ASS/SSA subtitle renderer";
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://github.com/libass/libass";
|
2015-02-09 07:27:10 -08:00
|
|
|
license = licenses.isc;
|
2015-02-28 07:11:23 -08:00
|
|
|
platforms = platforms.unix;
|
2017-03-27 10:11:17 -07:00
|
|
|
maintainers = with maintainers; [ codyopel ];
|
2020-03-31 18:11:51 -07:00
|
|
|
repositories.git = "git://github.com/libass/libass.git";
|
2011-02-09 13:10:42 -08:00
|
|
|
};
|
|
|
|
}
|