3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/libbluray/default.nix
R. RyanTM 42bad1bf03 libbluray: 1.0.2 -> 1.1.0 (#57270)
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/libbluray/versions
2019-04-08 22:50:48 +02:00

66 lines
1.9 KiB
Nix

{ stdenv, fetchurl, pkgconfig, fontconfig, autoreconfHook
, withJava ? false, jdk ? null, ant ? null
, withAACS ? false, libaacs ? null
, withBDplus ? false, libbdplus ? null
, withMetadata ? true, libxml2 ? null
, withFonts ? true, freetype ? null
}:
with stdenv.lib;
assert withJava -> jdk != null && ant != null;
assert withAACS -> libaacs != null;
assert withBDplus -> libbdplus != null;
assert withMetadata -> libxml2 != null;
assert withFonts -> freetype != null;
# Info on how to use:
# https://wiki.archlinux.org/index.php/BluRay
stdenv.mkDerivation rec {
name = "libbluray-${version}";
version = "1.1.0";
src = fetchurl {
url = "http://get.videolan.org/libbluray/${version}/${name}.tar.bz2";
sha256 = "10zyqgccgl8kl9d9ljml86sm9s9l2424y55vilb3lifkdb9019p6";
};
patches = optional withJava ./BDJ-JARFILE-path.patch;
nativeBuildInputs = [ pkgconfig autoreconfHook ]
++ optionals withJava [ ant ]
;
buildInputs = [ fontconfig ]
++ optional withJava jdk
++ optional withMetadata libxml2
++ optional withFonts freetype
;
propagatedBuildInputs = optional withAACS libaacs;
NIX_LDFLAGS = [
(optionalString withAACS "-L${libaacs}/lib -laacs")
(optionalString withBDplus "-L${libbdplus}/lib -lbdplus")
];
preConfigure = ''
${optionalString withJava ''export JDK_HOME="${jdk.home}"''}
'';
configureFlags = with stdenv.lib;
optional (! withJava) "--disable-bdjava-jar"
++ optional (! withMetadata) "--without-libxml2"
++ optional (! withFonts) "--without-freetype"
;
meta = with stdenv.lib; {
homepage = http://www.videolan.org/developers/libbluray.html;
description = "Library to access Blu-Ray disks for video playback";
license = licenses.lgpl21;
maintainers = with maintainers; [ abbradar ];
platforms = platforms.unix;
};
}