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.
11 lines
279 B
Nix
11 lines
279 B
Nix
{ autoPatchelfHook, buildRubyGem, ruby }:
|
|
|
|
buildRubyGem rec {
|
|
inherit ruby;
|
|
name = "${gemName}-${version}";
|
|
gemName = "grpc-tools";
|
|
version = "1.41.1";
|
|
source.sha256 = "sha256-NlBwd8NRc8niZyOWUheqTgeYs6QP200jDWmEATeBXOE=";
|
|
nativeBuildInputs = [ autoPatchelfHook ];
|
|
}
|