1 { lib, stdenv, fetchurl, autoreconfHook, pkg-config, libzen, zlib }:
3 stdenv.mkDerivation rec {
4 pname = "libmediainfo";
8 url = "https://mediaarea.net/download/source/libmediainfo/${version}/libmediainfo_${version}.tar.xz";
9 hash = "sha256-duvlAuDzELVZ1d2Qcn2ar9X6uq7KNELzjmKd/AfaDSI=";
12 nativeBuildInputs = [ autoreconfHook pkg-config ];
13 buildInputs = [ zlib ];
14 propagatedBuildInputs = [ libzen ];
16 sourceRoot = "MediaInfoLib/Project/GNU/Library";
18 postPatch = lib.optionalString (stdenv.cc.targetPrefix != "") ''
19 substituteInPlace configure.ac \
20 --replace "pkg-config " "${stdenv.cc.targetPrefix}pkg-config "
23 configureFlags = [ "--enable-shared" ];
25 enableParallelBuilding = true;
28 install -vD -m 644 libmediainfo.pc "$out/lib/pkgconfig/libmediainfo.pc"
32 description = "Shared library for mediainfo";
33 homepage = "https://mediaarea.net/";
34 changelog = "https://mediaarea.net/MediaInfo/ChangeLog";
35 license = licenses.bsd2;
36 platforms = platforms.unix;
37 maintainers = [ maintainers.devhell ];