protobuf3: support cross compilation
Provide a native c compiler, which, and protoc
This commit is contained in:
parent
0d7ed1b771
commit
3653909bb9
@ -1,6 +1,8 @@
|
||||
{ callPackage, ... }:
|
||||
{ callPackage, externalProtoc, buildProtobuf, ... }:
|
||||
|
||||
callPackage ./generic-v3.nix {
|
||||
version = "3.1.0";
|
||||
sha256 = "0qlvpsmqgh9nw0k4zrxlxf75pafi3p0ahz99v6761b903y8qyv4i";
|
||||
externalProtoc = externalProtoc;
|
||||
buildProtobuf = buildProtobuf;
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
{ callPackage, lib, ... }:
|
||||
{ callPackage, lib, externalProtoc, buildProtobuf, ... }:
|
||||
|
||||
lib.overrideDerivation (callPackage ./generic-v3.nix {
|
||||
version = "3.4.1";
|
||||
sha256 = "1lzxmbqlnmi34kymnf399azv86gmdbrf71xiad6wc24bzpkzqybb";
|
||||
externalProtoc = externalProtoc;
|
||||
buildProtobuf = buildProtobuf;
|
||||
}) (attrs: { NIX_CFLAGS_COMPILE = "-Wno-error"; })
|
||||
|
@ -1,6 +1,8 @@
|
||||
{ callPackage, lib, ... }:
|
||||
{ callPackage, lib, externalProtoc, buildProtobuf, ... }:
|
||||
|
||||
lib.overrideDerivation (callPackage ./generic-v3.nix {
|
||||
version = "3.5.1.1";
|
||||
sha256 = "1h4xydr5j2zg1888ncn8a1jvqq8fgpgckrmjg6lqzy9jpkvqvfdk";
|
||||
externalProtoc = externalProtoc;
|
||||
buildProtobuf = buildProtobuf;
|
||||
}) (attrs: { NIX_CFLAGS_COMPILE = "-Wno-error"; })
|
||||
|
@ -1,6 +1,8 @@
|
||||
{ callPackage, ... }:
|
||||
{ callPackage, externalProtoc, buildProtobuf, ... }:
|
||||
|
||||
callPackage ./generic-v3.nix {
|
||||
version = "3.6.1";
|
||||
sha256 = "1bg40miylzpy2wgbd7l7zjgmk43l12q38fq0zkn0vzy1lsj457sq";
|
||||
externalProtoc = externalProtoc;
|
||||
buildProtobuf = buildProtobuf;
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, autoreconfHook, zlib, gmock
|
||||
, autoreconfHook, zlib, gmock, which, buildPackages
|
||||
, externalProtoc
|
||||
, buildProtobuf ? null
|
||||
, version, sha256
|
||||
, ...
|
||||
}:
|
||||
@ -28,8 +30,11 @@ stdenv.mkDerivation rec {
|
||||
--replace 'tmpnam(b)' '"'$TMPDIR'/foo"'
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook ];
|
||||
nativeBuildInputs = [ autoreconfHook buildPackages.which buildPackages.stdenv.cc ]
|
||||
++ stdenv.lib.optional externalProtoc [ buildProtobuf ];
|
||||
|
||||
buildInputs = [ zlib ];
|
||||
configureFlags = stdenv.lib.optional externalProtoc [ "--with-protoc=${buildProtobuf}/bin/protoc" ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
|
@ -11726,10 +11726,30 @@ with pkgs;
|
||||
|
||||
protobuf = protobuf3_6;
|
||||
|
||||
protobuf3_6 = callPackage ../development/libraries/protobuf/3.6.nix { };
|
||||
protobuf3_5 = callPackage ../development/libraries/protobuf/3.5.nix { };
|
||||
protobuf3_4 = callPackage ../development/libraries/protobuf/3.4.nix { };
|
||||
protobuf3_1 = callPackage ../development/libraries/protobuf/3.1.nix { };
|
||||
protobuf3_6 = callPackage ../development/libraries/protobuf/3.6.nix {
|
||||
externalProtoc = (stdenv.hostPlatform != stdenv.buildPlatform);
|
||||
buildProtobuf = if (stdenv.hostPlatform != stdenv.buildPlatform)
|
||||
then buildPackages.protobuf3_6
|
||||
else null;
|
||||
};
|
||||
protobuf3_5 = callPackage ../development/libraries/protobuf/3.5.nix {
|
||||
externalProtoc = (stdenv.hostPlatform != stdenv.buildPlatform);
|
||||
buildProtobuf = if (stdenv.hostPlatform != stdenv.buildPlatform)
|
||||
then buildPackages.protobuf3_5
|
||||
else null;
|
||||
};
|
||||
protobuf3_4 = callPackage ../development/libraries/protobuf/3.4.nix {
|
||||
externalProtoc = (stdenv.hostPlatform != stdenv.buildPlatform);
|
||||
buildProtobuf = if (stdenv.hostPlatform != stdenv.buildPlatform)
|
||||
then buildPackages.protobuf3_4
|
||||
else null;
|
||||
};
|
||||
protobuf3_1 = callPackage ../development/libraries/protobuf/3.1.nix {
|
||||
externalProtoc = (stdenv.hostPlatform != stdenv.buildPlatform);
|
||||
buildProtobuf = if (stdenv.hostPlatform != stdenv.buildPlatform)
|
||||
then buildPackages.protobuf3_1
|
||||
else null;
|
||||
};
|
||||
protobuf2_5 = callPackage ../development/libraries/protobuf/2.5.nix { };
|
||||
|
||||
protobufc = callPackage ../development/libraries/protobufc/1.3.nix { };
|
||||
|
Loading…
Reference in New Issue
Block a user