1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/libraries/libass/default.nix

54 lines
1.6 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, pkgconfig, yasm
2015-06-01 00:47:59 +01: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 06:50:13 +01:00
, libiconv
}:
2015-06-01 00:47:59 +01:00
assert encaSupport -> enca != null;
assert fontconfigSupport -> fontconfig != null;
assert harfbuzzSupport -> harfbuzz != null;
2015-02-09 15:27:10 +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 {
name = "libass-${version}";
2017-06-20 04:30:43 +01:00
version = "0.13.7";
src = fetchurl {
2015-02-09 15:27:10 +00:00
url = "https://github.com/libass/libass/releases/download/${version}/${name}.tar.xz";
2017-06-20 04:30:43 +01:00
sha256 = "17byv926w1mxn56n896sxvdq4m0yv1l7qbm688h6zr3nzgsyarbh";
};
2015-02-09 15:27:10 +00:00
configureFlags = [
(mkFlag encaSupport "enca")
(mkFlag fontconfigSupport "fontconfig")
(mkFlag harfbuzzSupport "harfbuzz")
(mkFlag rasterizerSupport "rasterizer")
(mkFlag largeTilesSupport "large-tiles")
2015-02-09 15:27:10 +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 06:50:13 +01:00
++ optional harfbuzzSupport harfbuzz
++ optional stdenv.isDarwin libiconv;
meta = {
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;
maintainers = with maintainers; [ codyopel ];
repositories.git = git://github.com/libass/libass.git;
};
}