mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-10 22:57:15 +00:00
Merge pull request #117160 from marsam/abseil-cpp-shared
abseil-cpp: build shared
This commit is contained in:
commit
9f759c4a1c
|
@ -1,4 +1,4 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake }:
|
||||
{ lib, stdenv, fetchFromGitHub, cmake, static ? stdenv.hostPlatform.isStatic }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "abseil-cpp";
|
||||
|
@ -13,6 +13,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
cmakeFlags = [
|
||||
"-DCMAKE_CXX_STANDARD=17"
|
||||
"-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, zlib, c-ares, pkg-config, re2, openssl, protobuf
|
||||
, gflags, libnsl
|
||||
, gflags, abseil-cpp, libnsl
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
|
|||
];
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
propagatedBuildInputs = [ c-ares re2 zlib ];
|
||||
propagatedBuildInputs = [ c-ares re2 zlib abseil-cpp ];
|
||||
buildInputs = [ c-ares.cmake-config openssl protobuf gflags ]
|
||||
++ lib.optionals stdenv.isLinux [ libnsl ];
|
||||
|
||||
|
@ -32,8 +32,10 @@ stdenv.mkDerivation rec {
|
|||
"-DgRPC_SSL_PROVIDER=package"
|
||||
"-DgRPC_PROTOBUF_PROVIDER=package"
|
||||
"-DgRPC_GFLAGS_PROVIDER=package"
|
||||
"-DgRPC_ABSL_PROVIDER=package"
|
||||
"-DBUILD_SHARED_LIBS=ON"
|
||||
"-DCMAKE_SKIP_BUILD_RPATH=OFF"
|
||||
"-DCMAKE_CXX_STANDARD=17"
|
||||
];
|
||||
|
||||
# CMake creates a build directory by default, this conflicts with the
|
||||
|
|
|
@ -9,17 +9,6 @@ let
|
|||
rev = "e5b3425575734c323e1d947009dd74709437b684";
|
||||
sha256 = "0pyrpz9c8nxccwpgyr36w314mi8h132cis8ijvlqmmhqxwsi30hm";
|
||||
};
|
||||
# abseil-cpp in nixpkgs is too old
|
||||
abseil-cpp_2020923 = abseil-cpp.overrideAttrs (old: rec {
|
||||
version = "20200923.2";
|
||||
src = fetchFromGitHub {
|
||||
owner = "abseil";
|
||||
repo = "abseil-cpp";
|
||||
rev = version;
|
||||
sha256 = "G+wkaC4IPtyc/xCUyVFJOcHppPFU7KkhIHjv6uhVKGU=";
|
||||
};
|
||||
cmakeFlags = [ "-DCMAKE_CXX_STANDARD=17" "-DBUILD_SHARED_LIBS=ON" ];
|
||||
});
|
||||
zipcode_rel = "202011";
|
||||
jigyosyo = fetchurl {
|
||||
url = "https://osdn.net/projects/ponsfoot-aur/storage/mozc/jigyosyo-${zipcode_rel}.zip";
|
||||
|
@ -44,7 +33,7 @@ in clangStdenv.mkDerivation rec {
|
|||
|
||||
nativeBuildInputs = [ gyp ninja mesa python pkg-config qt5.wrapQtAppsHook six which unzip ];
|
||||
|
||||
buildInputs = [ protobuf zinnia qt5.qtbase fcitx5 abseil-cpp_2020923 jsoncpp gtest gtk2 ];
|
||||
buildInputs = [ protobuf zinnia qt5.qtbase fcitx5 abseil-cpp jsoncpp gtest gtk2 ];
|
||||
|
||||
patches = [
|
||||
# Support linking system abseil-cpp
|
||||
|
|
|
@ -28422,7 +28422,9 @@ in
|
|||
|
||||
osi = callPackage ../development/libraries/science/math/osi { };
|
||||
|
||||
or-tools = callPackage ../development/libraries/science/math/or-tools { };
|
||||
or-tools = callPackage ../development/libraries/science/math/or-tools {
|
||||
abseil-cpp = abseil-cpp.override { static = true; };
|
||||
};
|
||||
|
||||
rubiks = callPackage ../development/libraries/science/math/rubiks { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue