2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config, fontconfig, autoreconfHook, DiskArbitration
|
2022-05-09 21:37:43 +00:00
|
|
|
, withJava ? false, jdk, ant
|
|
|
|
, withAACS ? false, libaacs
|
|
|
|
, withBDplus ? false, libbdplus
|
|
|
|
, withMetadata ? true, libxml2
|
|
|
|
, withFonts ? true, freetype
|
2014-09-18 01:42:08 +00:00
|
|
|
}:
|
2012-02-22 20:29:29 +00:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
with lib;
|
2015-05-18 14:04:50 +00:00
|
|
|
|
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 {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "libbluray";
|
2022-03-08 23:51:55 +00:00
|
|
|
version = "1.3.1";
|
2012-02-22 20:29:29 +00:00
|
|
|
|
2014-09-18 01:42:08 +00:00
|
|
|
src = fetchurl {
|
2019-08-15 12:41:18 +00:00
|
|
|
url = "http://get.videolan.org/libbluray/${version}/${pname}-${version}.tar.bz2";
|
2022-03-08 23:51:55 +00:00
|
|
|
sha256 = "sha256-wksPQcW3N7u2XFRP5jSVY3p3HBClGd/IAudp8RK0O3U=";
|
2012-02-22 20:29:29 +00:00
|
|
|
};
|
|
|
|
|
2017-03-18 08:44:25 +00:00
|
|
|
patches = optional withJava ./BDJ-JARFILE-path.patch;
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config autoreconfHook ]
|
2015-05-18 14:04:50 +00:00
|
|
|
++ optionals withJava [ ant ]
|
2014-09-18 01:42:08 +00:00
|
|
|
;
|
2012-02-22 20:29:29 +00:00
|
|
|
|
2015-05-18 14:04:50 +00:00
|
|
|
buildInputs = [ fontconfig ]
|
|
|
|
++ optional withJava jdk
|
|
|
|
++ optional withMetadata libxml2
|
|
|
|
++ optional withFonts freetype
|
2020-04-06 09:20:00 +00:00
|
|
|
++ optional stdenv.isDarwin DiskArbitration
|
2015-05-18 14:04:50 +00:00
|
|
|
;
|
2012-02-22 20:29:29 +00:00
|
|
|
|
2017-03-18 08:44:25 +00:00
|
|
|
propagatedBuildInputs = optional withAACS libaacs;
|
|
|
|
|
2019-10-30 00:40:49 +00:00
|
|
|
NIX_LDFLAGS = toString [
|
2017-03-18 08:44:25 +00:00
|
|
|
(optionalString withAACS "-L${libaacs}/lib -laacs")
|
|
|
|
(optionalString withBDplus "-L${libbdplus}/lib -lbdplus")
|
|
|
|
];
|
2015-02-22 03:39:37 +00:00
|
|
|
|
2015-05-18 14:04:50 +00:00
|
|
|
preConfigure = ''
|
|
|
|
${optionalString withJava ''export JDK_HOME="${jdk.home}"''}
|
2015-02-22 03:39:37 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
configureFlags = with lib;
|
2018-01-28 15:00:48 +00:00
|
|
|
optional (! withJava) "--disable-bdjava-jar"
|
2014-09-18 01:42:08 +00:00
|
|
|
++ optional (! withMetadata) "--without-libxml2"
|
|
|
|
++ optional (! withFonts) "--without-freetype"
|
|
|
|
;
|
2014-05-03 23:17:40 +00:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2020-03-24 13:31:47 +00:00
|
|
|
homepage = "http://www.videolan.org/developers/libbluray.html";
|
2012-02-22 20:29:29 +00:00
|
|
|
description = "Library to access Blu-Ray disks for video playback";
|
2014-09-18 01:42:08 +00:00
|
|
|
license = licenses.lgpl21;
|
2017-03-18 08:44:25 +00:00
|
|
|
maintainers = with maintainers; [ abbradar ];
|
2016-08-02 17:50:55 +00:00
|
|
|
platforms = platforms.unix;
|
2012-02-22 20:29:29 +00:00
|
|
|
};
|
|
|
|
}
|