capnproto: fix cross

capnproto tries to compile some capnproto files, so when
cross-compiling we need to give it the build platform's capnproto
binary or it'll try to execute the one for the host platform.

+5 -2
+5 -2
pkgs/development/libraries/capnproto/default.nix
··· 1 - { lib, stdenv, fetchurl, cmake }: 1 + { lib, stdenv, fetchurl, capnproto, cmake }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 pname = "capnproto"; ··· 9 9 sha256 = "sha256-soBUp6K/6kK/w5LI0AljDZTXLozoaiOtbxi15yV0Bk8="; 10 10 }; 11 11 12 - nativeBuildInputs = [ cmake ]; 12 + nativeBuildInputs = [ cmake ] 13 + ++ lib.optional (!(stdenv.hostPlatform.isCompatible stdenv.buildPlatform)) capnproto; 14 + 15 + cmakeFlags = lib.optional (!(stdenv.hostPlatform.isCompatible stdenv.buildPlatform)) "-DEXTERNAL_CAPNP"; 13 16 14 17 meta = with lib; { 15 18 homepage = "https://capnproto.org/";