2022-12-28 21:21:41 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2023-01-20 10:41:00 +00:00
|
|
|
, fetchpatch
|
2022-12-28 21:21:41 +00:00
|
|
|
, autoreconfHook
|
|
|
|
, pkg-config
|
|
|
|
, protobuf
|
|
|
|
, zlib
|
|
|
|
, buildPackages
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "protobuf-c";
|
2022-09-30 11:47:45 +00:00
|
|
|
version = "1.4.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "protobuf-c";
|
|
|
|
repo = "protobuf-c";
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-TJCLzxozuZ8ynrBQ2lKyk03N+QA/lbOwywUjDUdTlbM=";
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
patches = [
|
|
|
|
# https://github.com/protobuf-c/protobuf-c/pull/534
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/protobuf-c/protobuf-c/commit/a6c9ea5207aeac61c57b446ddf5a6b68308881d8.patch";
|
|
|
|
hash = "sha256-wTb8+YbvrCrOVpgthI5SJdG/CpQcOzCX4Bv47FPY804=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
2022-09-30 11:47:45 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ protobuf zlib ];
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
PROTOC = lib.getExe buildPackages.protobuf;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/protobuf-c/protobuf-c/";
|
|
|
|
description = "C bindings for Google's Protocol Buffers";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
platforms = platforms.all;
|
2022-12-28 21:21:41 +00:00
|
|
|
maintainers = with maintainers; [ nickcao ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|