2021-09-22 15:38:15 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, pkg-config }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libebml";
|
2021-03-15 08:37:03 +00:00
|
|
|
version = "1.4.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Matroska-Org";
|
|
|
|
repo = "libebml";
|
|
|
|
rev = "release-${version}";
|
2021-03-15 08:37:03 +00:00
|
|
|
sha256 = "1hiilnabar826lfxsaflqjhgsdli6hzzhjv8q2nmw36fvvlyks25";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-09-22 15:38:15 +00:00
|
|
|
patches = [
|
|
|
|
# Upstream fix for gcc-11
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/Matroska-Org/libebml/commit/f0bfd53647961e799a43d918c46cf3b6bff89806.patch";
|
|
|
|
sha256 = "1yd6rsds03kwx5jki4hihd2bpfh26g5l1pi82qzaqzarixdxwzvl";
|
|
|
|
excludes = [ "ChangeLog" ];
|
|
|
|
})
|
2022-09-30 11:47:45 +00:00
|
|
|
# in master post 1.4.2, see https://github.com/Matroska-Org/libebml/issues/97
|
|
|
|
(fetchpatch {
|
|
|
|
name = "fix-pkg-config.patch";
|
|
|
|
url = "https://github.com/Matroska-Org/libebml/commit/42fbae35d291b737f2bb4ad5d643fd0d48537a88.patch";
|
|
|
|
sha256 = "020qp4a3l60mcm4n310ynxbbv5qlpmybb9xy10pjvx4brp83pmy3";
|
|
|
|
})
|
2021-09-22 15:38:15 +00:00
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DBUILD_SHARED_LIBS=YES"
|
2021-03-15 08:37:03 +00:00
|
|
|
"-DCMAKE_INSTALL_PREFIX="
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Extensible Binary Meta Language library";
|
|
|
|
homepage = "https://dl.matroska.org/downloads/libebml/";
|
|
|
|
license = licenses.lgpl21;
|
|
|
|
maintainers = with maintainers; [ spwhitt ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|