1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-26 23:52:33 +00:00
nixpkgs/pkgs/development/libraries/libass/default.nix
Eelco Dolstra 5d8fe045b6 Revert "Refactor mkFlag out of old packages"
This reverts commit 3117e0c897.

Conflicts:
	pkgs/development/libraries/wayland/default.nix
	pkgs/servers/samba/4.x.nix
2015-06-04 14:54:50 +02:00

52 lines
1.6 KiB
Nix

{ stdenv, fetchurl, pkgconfig, yasm
, freetype, fribidi
, 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
}:
assert encaSupport -> enca != null;
assert fontconfigSupport -> fontconfig != null;
assert harfbuzzSupport -> harfbuzz != null;
let
mkFlag = optSet: flag: if optSet then "--enable-${flag}" else "--disable-${flag}";
in
with stdenv.lib;
stdenv.mkDerivation rec {
name = "libass-${version}";
version = "0.12.2";
src = fetchurl {
url = "https://github.com/libass/libass/releases/download/${version}/${name}.tar.xz";
sha256 = "1qzibgqmnnqk2r116lpk1br764g0v74f2zp12y5id0p1plaing37";
};
configureFlags = [
(mkFlag encaSupport "enca")
(mkFlag fontconfigSupport "fontconfig")
(mkFlag harfbuzzSupport "harfbuzz")
(mkFlag rasterizerSupport "rasterizer")
(mkFlag largeTilesSupport "large-tiles")
];
nativeBuildInputs = [ pkgconfig yasm ];
buildInputs = [ freetype fribidi ]
++ optional encaSupport enca
++ optional fontconfigSupport fontconfig
++ optional harfbuzzSupport harfbuzz;
meta = {
description = "Portable ASS/SSA subtitle renderer";
homepage = https://github.com/libass/libass;
license = licenses.isc;
platforms = platforms.unix;
maintainers = with maintainers; [ codyopel urkud ];
repositories.git = git://github.com/libass/libass.git;
};
}