Files
nixpkgs/pkgs/by-name/li/libbluray/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

70 lines
1.5 KiB
Nix

{
lib,
stdenv,
fetchurl,
pkg-config,
fontconfig,
autoreconfHook,
withJava ? false,
jdk17,
ant,
stripJavaArchivesHook,
withAACS ? false,
libaacs,
withBDplus ? false,
libbdplus,
withMetadata ? true,
libxml2,
withFonts ? true,
freetype,
}:
# Info on how to use:
# https://wiki.archlinux.org/index.php/BluRay
stdenv.mkDerivation rec {
pname = "libbluray";
version = "1.3.4";
src = fetchurl {
url = "https://get.videolan.org/libbluray/${version}/${pname}-${version}.tar.bz2";
hash = "sha256-R4/9aKD13ejvbKmJt/A1taCiLFmRQuXNP/ewO76+Xys=";
};
nativeBuildInputs = [
pkg-config
autoreconfHook
]
++ lib.optionals withJava [
jdk17
ant
stripJavaArchivesHook
];
buildInputs = [
fontconfig
]
++ lib.optional withMetadata libxml2
++ lib.optional withFonts freetype;
propagatedBuildInputs = lib.optional withAACS libaacs;
env.JAVA_HOME = lib.optionalString withJava jdk17.home; # Fails at runtime without this
env.NIX_LDFLAGS =
lib.optionalString withAACS "-L${libaacs}/lib -laacs"
+ lib.optionalString withBDplus " -L${libbdplus}/lib -lbdplus";
configureFlags =
lib.optional (!withJava) "--disable-bdjava-jar"
++ lib.optional (!withMetadata) "--without-libxml2"
++ lib.optional (!withFonts) "--without-freetype";
meta = with lib; {
homepage = "http://www.videolan.org/developers/libbluray.html";
description = "Library to access Blu-Ray disks for video playback";
license = licenses.lgpl21;
maintainers = [ ];
platforms = platforms.unix;
};
}