2022-05-18 14:49:53 +00:00
|
|
|
{ lib, stdenv, fetchurl, autoreconfHook, pkg-config, libzen, zlib }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2023-02-09 11:40:11 +00:00
|
|
|
version = "22.12";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "libmediainfo";
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://mediaarea.net/download/source/libmediainfo/${version}/libmediainfo_${version}.tar.xz";
|
2023-02-09 11:40:11 +00:00
|
|
|
sha256 = "sha256-D8bTLwbWzl4UQHTS5X4NuN+k4451LTEjraJ8yviWNLw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
2022-05-18 14:49:53 +00:00
|
|
|
buildInputs = [ zlib ];
|
|
|
|
propagatedBuildInputs = [ libzen ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
sourceRoot = "MediaInfoLib/Project/GNU/Library";
|
|
|
|
|
|
|
|
postPatch = lib.optionalString (stdenv.cc.targetPrefix != "") ''
|
|
|
|
substituteInPlace configure.ac \
|
|
|
|
--replace "pkg-config " "${stdenv.cc.targetPrefix}pkg-config "
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
configureFlags = [ "--enable-shared" ];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
install -vD -m 644 libmediainfo.pc "$out/lib/pkgconfig/libmediainfo.pc"
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Shared library for mediainfo";
|
|
|
|
homepage = "https://mediaarea.net/";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [ maintainers.devhell ];
|
|
|
|
};
|
|
|
|
}
|