2014-09-18 01:42:08 +00:00
|
|
|
{ stdenv, fetchurl, pkgconfig
|
|
|
|
, withAACS ? false, libaacs ? null, jdk ? null, ant ? null
|
|
|
|
, withMetadata ? true, libxml2 ? null
|
|
|
|
, withFonts ? true, freetype ? null
|
|
|
|
}:
|
2012-02-22 20:29:29 +00:00
|
|
|
|
|
|
|
assert withAACS -> jdk != null && ant != null && libaacs != null;
|
2014-09-18 01:42:08 +00:00
|
|
|
assert withMetadata -> libxml2 != null;
|
|
|
|
assert withFonts -> freetype != null;
|
2012-02-22 20:29:29 +00:00
|
|
|
|
|
|
|
# Info on how to use:
|
|
|
|
# https://wiki.archlinux.org/index.php/BluRay
|
|
|
|
|
2014-09-18 01:42:08 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
baseName = "libbluray";
|
2014-10-07 19:17:04 +00:00
|
|
|
version = "0.6.2";
|
2014-09-18 01:42:08 +00:00
|
|
|
name = "${baseName}-${version}";
|
2012-02-22 20:29:29 +00:00
|
|
|
|
2014-09-18 01:42:08 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "ftp://ftp.videolan.org/pub/videolan/${baseName}/${version}/${name}.tar.bz2";
|
2014-10-07 19:17:04 +00:00
|
|
|
sha256 = "1l2wr9mwz5pikqxlxkjfw3rwz0l1j0n7x9hl80sfiqm1lk41194c";
|
2012-02-22 20:29:29 +00:00
|
|
|
};
|
|
|
|
|
2014-09-18 01:42:08 +00:00
|
|
|
nativeBuildInputs = with stdenv.lib;
|
|
|
|
[pkgconfig]
|
|
|
|
++ optional withAACS ant
|
|
|
|
;
|
2012-02-22 20:29:29 +00:00
|
|
|
|
2014-09-18 01:42:08 +00:00
|
|
|
buildInputs = with stdenv.lib;
|
|
|
|
optionals withAACS [jdk libaacs]
|
|
|
|
++ optional withMetadata libxml2
|
|
|
|
++ optional withFonts freetype
|
|
|
|
;
|
2012-02-22 20:29:29 +00:00
|
|
|
|
2014-09-18 01:42:08 +00:00
|
|
|
configureFlags = with stdenv.lib;
|
|
|
|
optionals withAACS ["--enable-bdjava" "--with-jdk=${jdk}"]
|
|
|
|
++ optional (! withMetadata) "--without-libxml2"
|
|
|
|
++ optional (! withFonts) "--without-freetype"
|
|
|
|
;
|
2014-05-03 23:17:40 +00:00
|
|
|
|
2014-09-18 01:42:08 +00:00
|
|
|
meta = with stdenv.lib; {
|
2012-02-22 20:29:29 +00:00
|
|
|
homepage = http://www.videolan.org/developers/libbluray.html;
|
|
|
|
description = "Library to access Blu-Ray disks for video playback";
|
2014-09-18 01:42:08 +00:00
|
|
|
license = licenses.lgpl21;
|
|
|
|
maintainers = [ maintainers.abbradar ];
|
2012-02-22 20:29:29 +00:00
|
|
|
};
|
|
|
|
}
|