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 {
|
|
|
|
pname = "libmediainfo";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "23.11";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://mediaarea.net/download/source/libmediainfo/${version}/libmediainfo_${version}.tar.xz";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-GX5U/MeePA1d9EqPWNxOAYvC+F0T+jvtVK89xW1ehT0=";
|
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/";
|
2023-07-15 17:15:38 +00:00
|
|
|
changelog = "https://mediaarea.net/MediaInfo/ChangeLog";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd2;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [ maintainers.devhell ];
|
|
|
|
};
|
|
|
|
}
|