depot/third_party/nixpkgs/pkgs/development/libraries/libdvdnav/4.2.1.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

50 lines
1.5 KiB
Nix

{lib, stdenv, fetchurl, pkg-config, libdvdread}:
stdenv.mkDerivation rec {
pname = "libdvdnav";
version = "4.2.1";
src = fetchurl {
url = "http://dvdnav.mplayerhq.hu/releases/libdvdnav-${version}.tar.xz";
sha256 = "7fca272ecc3241b6de41bbbf7ac9a303ba25cb9e0c82aa23901d3104887f2372";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [libdvdread];
# The upstream supports two configuration workflow:
# one is to generate ./configure via `autoconf`,
# the other is to run ./configure2.
# ./configure2 is a configureation script included in the upstream source
# that supports common "--<name>" flags and generates config.mak and config.h.
# See INSTALL inside the upstream source for detail.
configureScript = "./configure2";
configureFlags = [
"--cc=${stdenv.cc.targetPrefix}cc"
# Let's strip the binaries ourselves,
# as unprefixed `strip` command is not available during cross compilation.
"--disable-strip"
];
preConfigure = ''
mkdir -p $out
'';
makeFlags = [
"AR=${stdenv.cc.targetPrefix}ar"
"LD=${stdenv.cc.targetPrefix}ld"
"RANLIB=${stdenv.cc.targetPrefix}ranlib"
];
meta = {
homepage = "http://dvdnav.mplayerhq.hu/";
description = "Library that implements DVD navigation features such as DVD menus";
mainProgram = "dvdnav-config";
license = lib.licenses.gpl2;
maintainers = [ lib.maintainers.wmertens ];
platforms = lib.platforms.linux;
};
passthru = { inherit libdvdread; };
}