Fix protobuf env

This commit is contained in:
Luc Perkins 2022-07-29 02:49:09 +02:00
parent 8866ce44a5
commit 3aca700003
No known key found for this signature in database
GPG key ID: 4F102D0C16E232F2
17 changed files with 126 additions and 50 deletions

View file

@ -14,20 +14,21 @@ nix flake init --template github:the-nix-way/dev-templates#rust
Available templates:
| Language/framework/tool | Template |
| :---------------------- | :-------------------- |
| [Dhall] | [`dhall`](./dhall/) |
| [Elixir] | [`elixir`](./elixir/) |
| [Gleam] | [`gleam`](./gleam/) |
| [Go] 1.17 | [`go1_17`](./go1.17/) |
| [Go] 1.18 | [`go1_18`](./go1.18/) |
| [Java] | [`java`](./java/) |
| [Kotlin] | [`kotlin`](./kotlin/) |
| [Nix] | [`nix`](./nix/) |
| [Node.js][node] | [`node`](./node/) |
| [Rust] | [`rust`](./rust/) |
| [Scala] | [`scala`](./scala/) |
| [Zig] | [`zig`](./zig/) |
| Language/framework/tool | Template |
| :---------------------- | :------------------------ |
| [Dhall] | [`dhall`](./dhall/) |
| [Elixir] | [`elixir`](./elixir/) |
| [Gleam] | [`gleam`](./gleam/) |
| [Go] 1.17 | [`go1_17`](./go1.17/) |
| [Go] 1.18 | [`go1_18`](./go1.18/) |
| [Java] | [`java`](./java/) |
| [Kotlin] | [`kotlin`](./kotlin/) |
| [Nix] | [`nix`](./nix/) |
| [Node.js][node] | [`node`](./node/) |
| [Protobuf] | [`protobuf`](./protobuf/) |
| [Rust] | [`rust`](./rust/) |
| [Scala] | [`scala`](./scala/) |
| [Zig] | [`zig`](./zig/) |
[dhall]: https://dhall-lang.org
[elixir]: https://elixir-lang.org
@ -37,6 +38,7 @@ Available templates:
[kotlin]: https://kotlinlang.org
[nix]: https://nixos.org
[node]: https://nodejs.org
[protobuf]: https://developers.google.com/protocol-buffers
[rust]: https://rust-lang.org
[scala]: https://scala-lang.org
[zig]: https://ziglang.org

View file

@ -17,11 +17,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659054591,
"narHash": "sha256-Ae4s4jHi1BHcowaS1VLXAdNlWUiAkY/GhZwuevWbgb4=",
"lastModified": 1659055503,
"narHash": "sha256-xav158P+xCxV01Nw0cHvvkGtw1qkxbivwdCk1nQb798=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0d3888a5213362bbeb04f9c83ff6856c8f8a4ff2",
"rev": "acc7ae948ffaaa9335ca58e3bc1e70626b53a733",
"type": "github"
},
"original": {

View file

@ -17,11 +17,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659054591,
"narHash": "sha256-Ae4s4jHi1BHcowaS1VLXAdNlWUiAkY/GhZwuevWbgb4=",
"lastModified": 1659055503,
"narHash": "sha256-xav158P+xCxV01Nw0cHvvkGtw1qkxbivwdCk1nQb798=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0d3888a5213362bbeb04f9c83ff6856c8f8a4ff2",
"rev": "acc7ae948ffaaa9335ca58e3bc1e70626b53a733",
"type": "github"
},
"original": {

View file

@ -78,6 +78,11 @@
description = "Node.js development environment";
};
protobuf = {
path = ./protobuf;
description = "Protobuf development environment";
};
rust = {
path = ./rust;
description = "Rust development environment";

View file

@ -17,11 +17,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659054591,
"narHash": "sha256-Ae4s4jHi1BHcowaS1VLXAdNlWUiAkY/GhZwuevWbgb4=",
"lastModified": 1659055503,
"narHash": "sha256-xav158P+xCxV01Nw0cHvvkGtw1qkxbivwdCk1nQb798=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0d3888a5213362bbeb04f9c83ff6856c8f8a4ff2",
"rev": "acc7ae948ffaaa9335ca58e3bc1e70626b53a733",
"type": "github"
},
"original": {

View file

@ -17,11 +17,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659054591,
"narHash": "sha256-Ae4s4jHi1BHcowaS1VLXAdNlWUiAkY/GhZwuevWbgb4=",
"lastModified": 1659055503,
"narHash": "sha256-xav158P+xCxV01Nw0cHvvkGtw1qkxbivwdCk1nQb798=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0d3888a5213362bbeb04f9c83ff6856c8f8a4ff2",
"rev": "acc7ae948ffaaa9335ca58e3bc1e70626b53a733",
"type": "github"
},
"original": {

View file

@ -17,11 +17,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659054591,
"narHash": "sha256-Ae4s4jHi1BHcowaS1VLXAdNlWUiAkY/GhZwuevWbgb4=",
"lastModified": 1659055503,
"narHash": "sha256-xav158P+xCxV01Nw0cHvvkGtw1qkxbivwdCk1nQb798=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0d3888a5213362bbeb04f9c83ff6856c8f8a4ff2",
"rev": "acc7ae948ffaaa9335ca58e3bc1e70626b53a733",
"type": "github"
},
"original": {

View file

@ -17,11 +17,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659054591,
"narHash": "sha256-Ae4s4jHi1BHcowaS1VLXAdNlWUiAkY/GhZwuevWbgb4=",
"lastModified": 1659055503,
"narHash": "sha256-xav158P+xCxV01Nw0cHvvkGtw1qkxbivwdCk1nQb798=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0d3888a5213362bbeb04f9c83ff6856c8f8a4ff2",
"rev": "acc7ae948ffaaa9335ca58e3bc1e70626b53a733",
"type": "github"
},
"original": {

View file

@ -17,11 +17,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659054591,
"narHash": "sha256-Ae4s4jHi1BHcowaS1VLXAdNlWUiAkY/GhZwuevWbgb4=",
"lastModified": 1659055503,
"narHash": "sha256-xav158P+xCxV01Nw0cHvvkGtw1qkxbivwdCk1nQb798=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0d3888a5213362bbeb04f9c83ff6856c8f8a4ff2",
"rev": "acc7ae948ffaaa9335ca58e3bc1e70626b53a733",
"type": "github"
},
"original": {

View file

@ -17,11 +17,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659054591,
"narHash": "sha256-Ae4s4jHi1BHcowaS1VLXAdNlWUiAkY/GhZwuevWbgb4=",
"lastModified": 1659055503,
"narHash": "sha256-xav158P+xCxV01Nw0cHvvkGtw1qkxbivwdCk1nQb798=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0d3888a5213362bbeb04f9c83ff6856c8f8a4ff2",
"rev": "acc7ae948ffaaa9335ca58e3bc1e70626b53a733",
"type": "github"
},
"original": {

View file

@ -17,11 +17,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659054591,
"narHash": "sha256-Ae4s4jHi1BHcowaS1VLXAdNlWUiAkY/GhZwuevWbgb4=",
"lastModified": 1659055503,
"narHash": "sha256-xav158P+xCxV01Nw0cHvvkGtw1qkxbivwdCk1nQb798=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0d3888a5213362bbeb04f9c83ff6856c8f8a4ff2",
"rev": "acc7ae948ffaaa9335ca58e3bc1e70626b53a733",
"type": "github"
},
"original": {

1
protobuf/.envrc Normal file
View file

@ -0,0 +1 @@
use flake .

42
protobuf/flake.lock Normal file
View 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
View 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
'';
};
};
});
}

View file

@ -32,11 +32,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659054591,
"narHash": "sha256-Ae4s4jHi1BHcowaS1VLXAdNlWUiAkY/GhZwuevWbgb4=",
"lastModified": 1659055503,
"narHash": "sha256-xav158P+xCxV01Nw0cHvvkGtw1qkxbivwdCk1nQb798=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0d3888a5213362bbeb04f9c83ff6856c8f8a4ff2",
"rev": "acc7ae948ffaaa9335ca58e3bc1e70626b53a733",
"type": "github"
},
"original": {

View file

@ -17,11 +17,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659054591,
"narHash": "sha256-Ae4s4jHi1BHcowaS1VLXAdNlWUiAkY/GhZwuevWbgb4=",
"lastModified": 1659055503,
"narHash": "sha256-xav158P+xCxV01Nw0cHvvkGtw1qkxbivwdCk1nQb798=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0d3888a5213362bbeb04f9c83ff6856c8f8a4ff2",
"rev": "acc7ae948ffaaa9335ca58e3bc1e70626b53a733",
"type": "github"
},
"original": {

View file

@ -17,11 +17,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1659054591,
"narHash": "sha256-Ae4s4jHi1BHcowaS1VLXAdNlWUiAkY/GhZwuevWbgb4=",
"lastModified": 1659055503,
"narHash": "sha256-xav158P+xCxV01Nw0cHvvkGtw1qkxbivwdCk1nQb798=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0d3888a5213362bbeb04f9c83ff6856c8f8a4ff2",
"rev": "acc7ae948ffaaa9335ca58e3bc1e70626b53a733",
"type": "github"
},
"original": {