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

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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