Skip to content

Commit

Permalink
protobuf-c: unstable-2023-07-08 -> 1.5.0
Browse files Browse the repository at this point in the history
Release notes:
https://github.com/protobuf-c/protobuf-c/releases/tag/v1.5.0

Split out `dev` and `lib` and added a workaround for the `unbound`
configure script, expecting both `include` and `lib` dirs in the
same base path.

Rerouted the unbound configure path for protobufc to the `dev`
subpackage.
  • Loading branch information
haraldh committed Jan 26, 2024
1 parent 66a9817 commit b0905c0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
19 changes: 16 additions & 3 deletions pkgs/development/libraries/protobufc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,34 @@

stdenv.mkDerivation rec {
pname = "protobuf-c";
version = "unstable-2023-07-08";
version = "1.5.0";

src = fetchFromGitHub {
owner = "protobuf-c";
repo = "protobuf-c";
rev = "fa86fddbd000316772d1deb5a8d1201fa7599ef7";
hash = "sha256-pmqZYFREPgSrWPekymTglhtAv6gQR1gP3dOl3hqjYig=";
rev = "refs/tags/v${version}";
hash = "sha256-Dkpcc7ZfvAIVY91trRiHuiRFcUGUbQxbheYKTBcq80I=";
};

outputs = [ "out" "dev" "lib" ];

nativeBuildInputs = [ autoreconfHook pkg-config ];

buildInputs = [ protobuf zlib ];

env.PROTOC = lib.getExe buildPackages.protobuf;

postInstall = ''
# workaround for unbound configure script, which expects
# both lib and include dirs in the same base path
mkdir -p $dev/lib
for file in $lib/lib/*; do
ln -s $file $dev/lib
done
mkdir -p $out/nix-support
echo "$lib" >> $out/nix-support/propagated-native-build-inputs
'';

meta = with lib; {
homepage = "https://github.com/protobuf-c/protobuf-c/";
description = "C bindings for Google's Protocol Buffers";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/tools/networking/unbound/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ stdenv.mkDerivation (finalAttrs: {
"--with-libsodium=${symlinkJoin { name = "libsodium-full"; paths = [ libsodium.dev libsodium.out ]; }}"
] ++ lib.optionals withDNSTAP [
"--enable-dnstap"
"--with-protobuf-c=${protobufc}"
"--with-protobuf-c=${protobufc.dev}"
] ++ lib.optionals withTFO [
"--enable-tfo-client"
"--enable-tfo-server"
Expand Down

0 comments on commit b0905c0

Please sign in to comment.