Skip to content

Commit

Permalink
Merge pull request #52934 from veprbl/pr/arrow_cpp_gtest_fix
Browse files Browse the repository at this point in the history
arrow-cpp: fix build
  • Loading branch information
veprbl committed Dec 26, 2018
2 parents 626cc7e + 956b4a8 commit 8e79ebc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions pkgs/development/libraries/arrow-cpp/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, symlinkJoin, fetchurl, fetchFromGitHub, boost, brotli, cmake, double-conversion, flatbuffers, gflags, glog, gtest, lz4, perl, python, rapidjson, snappy, thrift, which, zlib, zstd }:
{ stdenv, symlinkJoin, fetchurl, fetchFromGitHub, boost, brotli, cmake, double-conversion, flatbuffers, gflags, glog, gtest_static, lz4, perl, python, rapidjson, snappy, thrift, which, zlib, zstd }:

let
parquet-testing = fetchFromGitHub {
Expand Down Expand Up @@ -49,7 +49,7 @@ stdenv.mkDerivation rec {
FLATBUFFERS_HOME = flatbuffers;
GFLAGS_HOME = gflags;
GLOG_HOME = glog;
GTEST_HOME = gtest;
GTEST_HOME = symlinkJoin { name="gtest-wrap"; paths = [ gtest_static gtest_static.dev ]; };
LZ4_HOME = symlinkJoin { name="lz4-wrap"; paths = [ lz4 lz4.dev ]; };
RAPIDJSON_HOME = rapidjson;
SNAPPY_HOME = symlinkJoin { name="snappy-wrap"; paths = [ snappy snappy.dev ]; };
Expand Down
8 changes: 4 additions & 4 deletions pkgs/development/libraries/gtest/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{ stdenv, cmake, ninja, fetchFromGitHub }:
{ stdenv, cmake, ninja, fetchFromGitHub
, static ? false }:

stdenv.mkDerivation rec {
name = "gtest-${version}";
version = "1.8.1";
Expand All @@ -18,9 +20,7 @@ stdenv.mkDerivation rec {

nativeBuildInputs = [ cmake ninja ];

cmakeFlags = [
"-DBUILD_SHARED_LIBS=ON"
];
cmakeFlags = stdenv.lib.optional (!static) "-DBUILD_SHARED_LIBS=ON";

meta = with stdenv.lib; {
description = "Google's framework for writing C++ tests";
Expand Down
3 changes: 2 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3160,7 +3160,8 @@ in

gt5 = callPackage ../tools/system/gt5 { };

gtest = callPackage ../development/libraries/gtest {};
gtest = callPackage ../development/libraries/gtest { };
gtest_static = callPackage ../development/libraries/gtest { static = true; };
gmock = gtest; # TODO: move to aliases.nix

gbenchmark = callPackage ../development/libraries/gbenchmark {};
Expand Down

0 comments on commit 8e79ebc

Please sign in to comment.