dev-templates/protobuf/flake.nix
2022-07-31 21:01:58 +02:00

25 lines
652 B
Nix

{
description = "A Nix-flake-based Protobuf development environment";
inputs = { dev.url = "github:the-nix-way/dev-templates"; };
outputs = { self, dev }:
let inherit (dev.lib) flake-utils nixpkgs;
in flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
inherit (pkgs) buf mkShell protobuf;
in {
devShells = {
default = mkShell {
buildInputs = [ buf protobuf ];
shellHook = ''
echo "buf `${buf}/bin/buf --version`"
${protobuf}/bin/protoc --version
'';
};
};
});
}