From c28308c29ed5d296556d63260552aa5a16666e76 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 20 Mar 2021 04:20:00 +0000 Subject: [PATCH 1/4] abseil-cpp: build shared by default --- pkgs/development/libraries/abseil-cpp/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/abseil-cpp/default.nix b/pkgs/development/libraries/abseil-cpp/default.nix index f724c2e0acf1..0813a965524b 100644 --- a/pkgs/development/libraries/abseil-cpp/default.nix +++ b/pkgs/development/libraries/abseil-cpp/default.nix @@ -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 ]; From eff48104db0b30168e1be952ca68128652860594 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 20 Mar 2021 04:20:00 +0000 Subject: [PATCH 2/4] grpc: do not use vendored abseil --- pkgs/development/libraries/grpc/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/grpc/default.nix b/pkgs/development/libraries/grpc/default.nix index 780f8c5f0b5a..937f73e95fc5 100644 --- a/pkgs/development/libraries/grpc/default.nix +++ b/pkgs/development/libraries/grpc/default.nix @@ -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 From 21f865da07c6459d80cfd1928bd8d84180a74d5c Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 20 Mar 2021 04:20:00 +0000 Subject: [PATCH 3/4] or-tools: use abseil static --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index dfc782542c6b..6a4dc1a1fa22 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -28339,7 +28339,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 { }; From f3228cce6de1cfdbbf80920e5166fcbf46a51c7e Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 20 Mar 2021 04:20:00 +0000 Subject: [PATCH 4/4] fcitx5-mozc: use nixpkgs abseil --- pkgs/tools/inputmethods/fcitx5/fcitx5-mozc.nix | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/pkgs/tools/inputmethods/fcitx5/fcitx5-mozc.nix b/pkgs/tools/inputmethods/fcitx5/fcitx5-mozc.nix index 08f43b87cfe2..d077b0a25c59 100644 --- a/pkgs/tools/inputmethods/fcitx5/fcitx5-mozc.nix +++ b/pkgs/tools/inputmethods/fcitx5/fcitx5-mozc.nix @@ -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