Skip to content

Commit

Permalink
Revert "protobuf3: support cross compilation"
Browse files Browse the repository at this point in the history
  • Loading branch information
lheckemann committed Oct 15, 2018
1 parent dc6abb3 commit f028f77
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions pkgs/development/libraries/protobuf/generic-v3.nix
@@ -1,12 +1,11 @@
{ stdenv
, fetchFromGitHub
, autoreconfHook, zlib, gmock, which, buildPackages
, autoreconfHook, zlib, gmock
, version, sha256
, ...
}:

let
mkProtobufDerivation = buildProtobuf: stdenv: stdenv.mkDerivation rec {
stdenv.mkDerivation rec {
name = "protobuf-${version}";

# make sure you test also -A pythonPackages.protobuf
Expand All @@ -29,10 +28,8 @@ mkProtobufDerivation = buildProtobuf: stdenv: stdenv.mkDerivation rec {
--replace 'tmpnam(b)' '"'$TMPDIR'/foo"'
'';

nativeBuildInputs = [ autoreconfHook buildPackages.which buildPackages.stdenv.cc buildProtobuf ];

nativeBuildInputs = [ autoreconfHook ];
buildInputs = [ zlib ];
configureFlags = if buildProtobuf == null then [] else [ "--with-protoc=${buildProtobuf}/bin/protoc" ];

enableParallelBuilding = true;

Expand All @@ -57,7 +54,4 @@ mkProtobufDerivation = buildProtobuf: stdenv: stdenv.mkDerivation rec {
};

passthru.version = version;
};
in mkProtobufDerivation(if (stdenv.buildPlatform != stdenv.hostPlatform)
then (mkProtobufDerivation null buildPackages.stdenv)
else null) stdenv
}

0 comments on commit f028f77

Please sign in to comment.