Fix protobuf env
This commit is contained in:
parent
8866ce44a5
commit
3aca700003
17 changed files with 126 additions and 50 deletions
1
protobuf/.envrc
Normal file
1
protobuf/.envrc
Normal file
|
@ -0,0 +1 @@
|
|||
use flake .
|
42
protobuf/flake.lock
generated
Normal file
42
protobuf/flake.lock
generated
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1656928814,
|
||||
"narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "7e2a3b3dfd9af950a856d66b0a7d01e3c18aa249",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1659055503,
|
||||
"narHash": "sha256-xav158P+xCxV01Nw0cHvvkGtw1qkxbivwdCk1nQb798=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "acc7ae948ffaaa9335ca58e3bc1e70626b53a733",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
26
protobuf/flake.nix
Normal file
26
protobuf/flake.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
description = "A Nix-flake-based Protobuf development environment";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
inherit (pkgs) buf protobuf;
|
||||
in {
|
||||
devShells = {
|
||||
default = pkgs.mkShell {
|
||||
buildInputs = [ buf protobuf ];
|
||||
|
||||
shellHook = ''
|
||||
echo "buf `${buf}/bin/buf --version`"
|
||||
${protobuf}/bin/protoc --version
|
||||
'';
|
||||
};
|
||||
};
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue