summary refs log tree commit diff
path: root/pkgs/development/libraries/libbluray/default.nix
blob: f0eea80e89d2152003cc37c5988d29f6da1495a3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{stdenv, fetchgit, autoconf, automake, libtool, libaacs ? null, jdk ? null, ant ? null, withAACS ? false}:

assert withAACS -> jdk != null && ant != null && libaacs != null;

# Info on how to use:
# https://wiki.archlinux.org/index.php/BluRay

let baseName = "libbluray";
    version  = "0.2.1";

in

stdenv.mkDerivation {
  name = "${baseName}-${version}p1";

  src = fetchgit {
    url = git://git.videolan.org/libbluray.git;
    rev = "3b9a9f044644a6abe9cb09377f714ded9fdd6c87";
    sha256 = "551b623e76c2dba44b5490fb42ccdc491b28cd42841de28237b8edbed0f0711c";
  };

  nativeBuildInputs = [autoconf automake libtool];
  buildInputs = stdenv.lib.optionals withAACS [jdk ant libaacs];
  NIX_LDFLAGS = stdenv.lib.optionalString withAACS "-laacs";

  preConfigure = "./bootstrap";
  configureFlags = ["--disable-static"] ++ stdenv.lib.optionals withAACS ["--enable-bdjava" "--with-jdk=${jdk}"];

  # From Handbrake
  patches = [ ./A01-filter-dup.patch ];

  meta = {
    homepage = http://www.videolan.org/developers/libbluray.html;
    description = "Library to access Blu-Ray disks for video playback";
    license = stdenv.lib.licenses.lgpl21;
  };
}