2022-12-28 21:21:41 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
|
|
|
, pkg-config
|
2024-10-11 05:15:48 +00:00
|
|
|
, protobuf_25
|
2022-12-28 21:21:41 +00:00
|
|
|
, 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";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "1.5.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "protobuf-c";
|
|
|
|
repo = "protobuf-c";
|
2024-06-20 14:57:18 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-Dkpcc7ZfvAIVY91trRiHuiRFcUGUbQxbheYKTBcq80I=";
|
2022-09-30 11:47:45 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
outputs = [ "out" "dev" "lib" ];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
2022-09-30 11:47:45 +00:00
|
|
|
|
2024-10-11 05:15:48 +00:00
|
|
|
buildInputs = [ protobuf_25 zlib ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-10-11 05:15:48 +00:00
|
|
|
env.PROTOC = lib.getExe buildPackages.protobuf_25;
|
2022-12-28 21:21:41 +00:00
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|