@@ -1,4 +1,4 @@
1−{ stdenv, fetchFromGitHub, cmake, zlib, c-ares, pkgconfig, openssl, protobuf, gflags }:
1+{ stdenv, fetchFromGitHub, fetchpatch, cmake, zlib, c-ares, pkgconfig, openssl, protobuf, gflags }:
22
33stdenv.mkDerivation rec {
44 version = "1.25.0"; # N.B: if you change this, change pythonPackages.grpcio and pythonPackages.grpcio-tools to a matching version too
@@ -10,6 +10,14 @@ stdenv.mkDerivation rec {
1010 sha256 = "02nbmbk1xpibjzvbhi8xpazmwry46ki24vks1sh2p0aqwy4hv6yb";
1111 fetchSubmodules = true;
1212 };
13+ patches = [
14+ # Fix build on armv6l (https://github.com/grpc/grpc/pull/21341)
15+ (fetchpatch {
16+ url = "https://github.com/grpc/grpc/commit/ffb8a278389c8e3403b23a9897b65a7390c34645.patch";
17+ sha256 = "1lc12a3gccg9wxqhnwgldlj3zmlm6lxg8dssvvj1x7hf655kw3w3";
18+ })
19+ ];
20+
1321 nativeBuildInputs = [ cmake pkgconfig ];
1422 buildInputs = [ zlib c-ares c-ares.cmake-config openssl protobuf gflags ];
1523