nix: Add grpc-tools as explicit dependency
The grpc-tools gem is just a bundle of prebuilt binaries with a thin layer of wiring to invoke the correct binary given the calling system. On Nix, prebuilt binaries don't work because they can't find their dynamically linked libraries in the "normal" places you'd expect on a Linux machine. Nix has tooling (`autoPatchelf`) which can fixup a given binary and wire it correctly to the Nix store. We need to have Nix fetch and build `grpc-tools` so we can invoke this tooling rather than just letting `bundle install` get the gem.
This commit is contained in:
parent
92ab5828b1
commit
7a38f46633
10
nix/grpc-tools.nix
Normal file
10
nix/grpc-tools.nix
Normal file
@ -0,0 +1,10 @@
|
||||
{ autoPatchelfHook, buildRubyGem, ruby }:
|
||||
|
||||
buildRubyGem rec {
|
||||
inherit ruby;
|
||||
name = "${gemName}-${version}";
|
||||
gemName = "grpc-tools";
|
||||
version = "1.41.1";
|
||||
source.sha256 = "sha256-NlBwd8NRc8niZyOWUheqTgeYs6QP200jDWmEATeBXOE=";
|
||||
nativeBuildInputs = [ autoPatchelfHook ];
|
||||
}
|
||||
@ -12,6 +12,8 @@ final: prev: rec {
|
||||
|
||||
go-tools = prev.callPackage ./go-tools.nix { };
|
||||
|
||||
grpc-tools = prev.callPackage ./grpc-tools.nix { };
|
||||
|
||||
go-mockery = prev.callPackage ./go-mockery.nix { };
|
||||
|
||||
go-changelog = prev.callPackage ./go-changelog.nix { };
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
, go-protobuf
|
||||
, go-protobuf-json
|
||||
, go-tools
|
||||
, grpc-tools
|
||||
, grpcurl
|
||||
, libpng
|
||||
, libtool
|
||||
@ -41,6 +42,7 @@ mkShell rec {
|
||||
go-tools
|
||||
go-mockery
|
||||
go-changelog
|
||||
grpc-tools
|
||||
|
||||
# Needed for website/
|
||||
autoconf
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user