From 2e8bb3178ce0b985e8d2720d9a2f797dc064311d Mon Sep 17 00:00:00 2001 From: Josh Rickmar Date: Tue, 12 Nov 2024 22:29:34 +0000 Subject: [PATCH] Add Nix development shell to regen api.proto. To use, run `nix develop` to enter a nested shell with protoc, run regen.sh, and then exit the shell. Requires Nix's flake features to be enabled. Files have been regenerated with a slightly more recent protobuffers version, but no functional change. --- flake.lock | 26 ++++++++++++++++++++++++++ flake.nix | 27 +++++++++++++++++++++++++++ rpc/walletrpc/api.pb.go | 2 +- rpc/walletrpc/api_grpc.pb.go | 2 +- 4 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 000000000..c902dc03a --- /dev/null +++ b/flake.lock @@ -0,0 +1,26 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1731139594, + "narHash": "sha256-IigrKK3vYRpUu+HEjPL/phrfh7Ox881er1UEsZvw9Q4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "76612b17c0ce71689921ca12d9ffdc9c23ce40b2", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-unstable", + "type": "indirect" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 000000000..b2e73c35b --- /dev/null +++ b/flake.nix @@ -0,0 +1,27 @@ +{ + inputs = { + nixpkgs.url = "nixpkgs/nixos-unstable"; + }; + + outputs = { self, nixpkgs, ... }@inputs: + let + supportedSystems = [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + ]; + forAllSystems = fn: + nixpkgs.lib.genAttrs supportedSystems + (system: fn { pkgs = import nixpkgs { inherit system; }; }); + in { + devShells = forAllSystems ({ pkgs }: { + default = pkgs.mkShell { + nativeBuildInputs = with pkgs; [ + go_1_23 + protobuf + ]; + }; + }); + }; +} diff --git a/rpc/walletrpc/api.pb.go b/rpc/walletrpc/api.pb.go index ee434a622..60d507939 100644 --- a/rpc/walletrpc/api.pb.go +++ b/rpc/walletrpc/api.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.34.2 -// protoc v5.28.0 +// protoc v5.28.2 // source: api.proto package walletrpc diff --git a/rpc/walletrpc/api_grpc.pb.go b/rpc/walletrpc/api_grpc.pb.go index e8b1e9eaa..107109c72 100644 --- a/rpc/walletrpc/api_grpc.pb.go +++ b/rpc/walletrpc/api_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 -// - protoc v5.28.0 +// - protoc v5.28.2 // source: api.proto package walletrpc