libbluray: fix build using withJava, make java build deterministic

This commit is contained in:
TomaSajt 2024-03-11 17:37:28 +01:00
parent 2d5db19dff
commit 616f7e3b7e
No known key found for this signature in database
GPG Key ID: F011163C050122A1

View File

@ -1,5 +1,5 @@
{ lib, stdenv, fetchurl, fetchpatch, pkg-config, fontconfig, autoreconfHook, DiskArbitration
, withJava ? false, jdk, ant
, withJava ? false, jdk17, ant, stripJavaArchivesHook
, withAACS ? false, libaacs
, withBDplus ? false, libbdplus
, withMetadata ? true, libxml2
@ -19,23 +19,18 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ pkg-config autoreconfHook ]
++ lib.optionals withJava [ ant ];
++ lib.optionals withJava [ jdk17 ant stripJavaArchivesHook ];
buildInputs = [ fontconfig ]
++ lib.optional withJava jdk
++ lib.optional withMetadata libxml2
++ lib.optional withFonts freetype
++ lib.optional stdenv.isDarwin DiskArbitration;
propagatedBuildInputs = lib.optional withAACS libaacs;
NIX_LDFLAGS = lib.optionalString withAACS "-L${libaacs}/lib -laacs"
env.NIX_LDFLAGS = lib.optionalString withAACS "-L${libaacs}/lib -laacs"
+ lib.optionalString withBDplus " -L${libbdplus}/lib -lbdplus";
preConfigure = lib.optionalString withJava ''
export JDK_HOME="${jdk.home}"
'';
configureFlags = lib.optional (!withJava) "--disable-bdjava-jar"
++ lib.optional (!withMetadata) "--without-libxml2"
++ lib.optional (!withFonts) "--without-freetype";