2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config, yasm
|
2020-10-28 19:45:57 +00:00
|
|
|
, freetype, fribidi, harfbuzz
|
2015-02-09 15:27:10 +00:00
|
|
|
, fontconfigSupport ? true, fontconfig ? null # fontconfig 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 fontconfigSupport -> fontconfig != null;
|
2015-02-09 15:27:10 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "libass";
|
2023-03-01 02:17:20 +00:00
|
|
|
version = "0.17.1";
|
2011-02-09 21:10:42 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 12:41:18 +00:00
|
|
|
url = "https://github.com/libass/libass/releases/download/${version}/${pname}-${version}.tar.xz";
|
2023-03-01 02:17:20 +00:00
|
|
|
sha256 = "sha256-8NoLv7pHbBauPhz9hiJW0wkVkR96uqGxbOYu5lMZJ4Q=";
|
2011-02-09 21:10:42 +00:00
|
|
|
};
|
|
|
|
|
2015-02-09 15:27:10 +00:00
|
|
|
configureFlags = [
|
2023-01-26 17:31:02 +00:00
|
|
|
(lib.enableFeature fontconfigSupport "fontconfig")
|
|
|
|
(lib.enableFeature rasterizerSupport "rasterizer")
|
|
|
|
(lib.enableFeature largeTilesSupport "large-tiles")
|
2015-02-09 15:27:10 +00:00
|
|
|
];
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config yasm ];
|
2014-03-02 04:21:50 +00:00
|
|
|
|
2020-10-28 19:45:57 +00:00
|
|
|
buildInputs = [ freetype fribidi harfbuzz ]
|
2023-01-26 17:31:02 +00:00
|
|
|
++ lib.optional fontconfigSupport fontconfig
|
|
|
|
++ lib.optional stdenv.isDarwin libiconv;
|
2011-02-09 21:10:42 +00:00
|
|
|
|
2023-01-26 17:31:02 +00:00
|
|
|
meta = with lib; {
|
2014-03-02 04:21:50 +00:00
|
|
|
description = "Portable ASS/SSA subtitle renderer";
|
2020-04-01 01:11:51 +00: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 17:11:17 +00:00
|
|
|
maintainers = with maintainers; [ codyopel ];
|
2011-02-09 21:10:42 +00:00
|
|
|
};
|
|
|
|
}
|