depot/third_party/nixpkgs/pkgs/by-name/na/nanopb/generator.nix
Default email 98eb3e9ef5 Project import generated by Copybara.
GitOrigin-RevId: 00d80d13810dbfea8ab4ed1009b09100cca86ba8
2024-07-01 15:47:52 +00:00

27 lines
532 B
Nix

{ python3
, stdenvNoCC
, protobuf
, version
, generator-out
}:
stdenvNoCC.mkDerivation {
pname = "nanopb-generator";
inherit version;
dontUnpack = true;
nativeBuildInputs = [ python3.pkgs.wrapPython ];
propagatedBuildInputs = [
protobuf
python3.pkgs.nanopb-proto
];
installPhase = ''
mkdir -p $out/bin
cp ${generator-out}/bin/protoc-gen-nanopb $out/bin/
cp ${generator-out}/bin/nanopb_generator $out/bin/
wrapPythonPrograms
cp ${generator-out}/bin/nanopb_generator.py $out/bin/
'';
}