2022-09-09 14:08:57 +00:00
|
|
|
{ lib, stdenv, fetchurl, fetchpatch, pkg-config, fontconfig, autoreconfHook, DiskArbitration
|
2024-05-15 15:35:15 +00:00
|
|
|
, withJava ? false, jdk17, ant, stripJavaArchivesHook
|
2022-05-18 14:49:53 +00:00
|
|
|
, withAACS ? false, libaacs
|
|
|
|
, withBDplus ? false, libbdplus
|
|
|
|
, withMetadata ? true, libxml2
|
|
|
|
, withFonts ? true, freetype
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
# Info on how to use:
|
|
|
|
# https://wiki.archlinux.org/index.php/BluRay
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libbluray";
|
2023-01-11 07:51:40 +00:00
|
|
|
version = "1.3.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-08-21 13:32:41 +00:00
|
|
|
url = "https://get.videolan.org/libbluray/${version}/${pname}-${version}.tar.bz2";
|
2023-01-11 07:51:40 +00:00
|
|
|
hash = "sha256-R4/9aKD13ejvbKmJt/A1taCiLFmRQuXNP/ewO76+Xys=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config autoreconfHook ]
|
2024-05-15 15:35:15 +00:00
|
|
|
++ lib.optionals withJava [ jdk17 ant stripJavaArchivesHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [ fontconfig ]
|
2022-08-21 13:32:41 +00:00
|
|
|
++ lib.optional withMetadata libxml2
|
|
|
|
++ lib.optional withFonts freetype
|
|
|
|
++ lib.optional stdenv.isDarwin DiskArbitration;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
propagatedBuildInputs = lib.optional withAACS libaacs;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
env.NIX_LDFLAGS = lib.optionalString withAACS "-L${libaacs}/lib -laacs"
|
2022-08-21 13:32:41 +00:00
|
|
|
+ lib.optionalString withBDplus " -L${libbdplus}/lib -lbdplus";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
configureFlags = lib.optional (!withJava) "--disable-bdjava-jar"
|
|
|
|
++ lib.optional (!withMetadata) "--without-libxml2"
|
|
|
|
++ lib.optional (!withFonts) "--without-freetype";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|