git.iko.soy/typeable/nixpkgs
on master help sign in
libass: refactor & 0.11.1 -> 0.12.1
commitac726eb2dd8f9f5fabdd9802fee040f116be0fc8 authorcodyopel <codyopel@gmail.com> dateMon 9 Feb 2015, 10:27 (12 years ago) parent6e479db
1 file changed+36−17
pkgs/development/libraries/libass/default.nix+36−17
pkgs/development/libraries/libass/default.nix+36−17
@@ -1,34 +1,53 @@
11{ stdenv, fetchurl, pkgconfig, yasm
2−, freetype, fribidi, fontconfig
3−, enca ? null
4−, harfbuzz ? null
2+, freetype ? null
3+, fribidi ? null
4+, encaSupport ? true, enca ? null # enca support
5+, fontconfigSupport ? true, fontconfig ? null # fontconfig support
6+, harfbuzzSupport ? true, harfbuzz ? null # harfbuzz support
7+, rasterizerSupport ? false # Internal rasterizer
8+, largeTilesSupport ? false # Use larger tiles in the rasterizer
59}:
610
11+assert ((freetype != null) && (fribidi != null));
12+assert encaSupport -> (enca != null);
13+assert fontconfigSupport -> (fontconfig != null);
14+assert harfbuzzSupport -> (harfbuzz != null);
15+
716let
8− version = "0.11.1";
9− sha256 = "1b0ki1zdkhflszzj5qr45j9qsd0rfbb6ws5pqkny8jhih0l3lxwx";
10− baseurl = "https://github.com/libass/libass/releases/download";
11−in stdenv.mkDerivation rec {
17+ mkFlag = optSet: flag: if optSet then "--enable-${flag}" else "--disable-${flag}";
18+in
19+
20+with stdenv.lib;
21+stdenv.mkDerivation rec {
1222 name = "libass-${version}";
23+ version = "0.12.1";
1324
1425 src = fetchurl {
15− url = "${baseurl}/${version}/${name}.tar.xz";
16− inherit sha256;
26+ url = "https://github.com/libass/libass/releases/download/${version}/${name}.tar.xz";
27+ sha256 = "1mwj2nk9g6cq6f8m1hf0ijg1299rghhy9naahqq43sc2whblb1l7";
1728 };
1829
30+ configureFlags = [
31+ (mkFlag encaSupport "enca")
32+ (mkFlag fontconfigSupport "fontconfig")
33+ (mkFlag harfbuzzSupport "harfbuzz")
34+ (mkFlag rasterizerSupport "rasterizer")
35+ (mkFlag largeTilesSupport "large-tiles")
36+ ];
37+
1938 nativeBuildInputs = [ pkgconfig yasm ];
2039
21− buildInputs = [
22− freetype fribidi fontconfig
23− enca harfbuzz
24− ];
40+ buildInputs = [ freetype fribidi ]
41+ ++ optional encaSupport enca
42+ ++ optional fontconfigSupport fontconfig
43+ ++ optional harfbuzzSupport harfbuzz;
2544
2645 meta = {
2746 description = "Portable ASS/SSA subtitle renderer";
28− homepage = http://code.google.com/p/libass/;
29− license = stdenv.lib.licenses.isc;
30− platforms = stdenv.lib.platforms.linux;
31− maintainers = [ stdenv.lib.maintainers.urkud ];
47+ homepage = https://github.com/libass/libass;
48+ license = licenses.isc;
49+ platforms = platforms.linux;
50+ maintainers = with maintainers; [ codyopel urkud ];
3251 repositories.git = git://github.com/libass/libass.git;
3352 };
3453}