nanopb: Use protoc from buildPackages

This fixes cross compilation.
This commit is contained in:
adisbladis 2021-10-12 11:21:55 -05:00
parent e490a7c193
commit d8b35aa96b
No known key found for this signature in database
GPG key ID: 110BFAD44C6249B7

View file

@ -5,6 +5,7 @@
, protobuf , protobuf
, python3 , python3
, stdenv , stdenv
, buildPackages
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -25,7 +26,7 @@ stdenv.mkDerivation rec {
cmakeFlags = [ cmakeFlags = [
"-DBUILD_SHARED_LIBS=ON" # generate $out/lib/libprotobuf-nanopb.so{.0,} "-DBUILD_SHARED_LIBS=ON" # generate $out/lib/libprotobuf-nanopb.so{.0,}
"-DBUILD_STATIC_LIBS=ON" # generate $out/lib/libprotobuf-nanopb.a "-DBUILD_STATIC_LIBS=ON" # generate $out/lib/libprotobuf-nanopb.a
"-Dnanopb_PROTOC_PATH=${protobuf}/bin/protoc" "-Dnanopb_PROTOC_PATH=${buildPackages.protobuf}/bin/protoc"
]; ];
postInstall = '' postInstall = ''