Merge pull request #143967 from cpcloud/remove-abseil-cxx-standard-flag
abseil-cpp: remove cxx standard flag
This commit is contained in:
commit
3c691c350f
@ -29,6 +29,7 @@
|
||||
, webkitgtk
|
||||
, jemalloc
|
||||
, rnnoise
|
||||
, abseil-cpp
|
||||
# Transitive dependencies:
|
||||
, util-linuxMinimal
|
||||
, pcre
|
||||
@ -57,7 +58,11 @@
|
||||
# - https://github.com/void-linux/void-packages/blob/master/srcpkgs/telegram-desktop/template
|
||||
|
||||
let
|
||||
tg_owt = callPackage ./tg_owt.nix { };
|
||||
tg_owt = callPackage ./tg_owt.nix {
|
||||
abseil-cpp = abseil-cpp.override {
|
||||
cxxStandard = "17";
|
||||
};
|
||||
};
|
||||
in
|
||||
mkDerivation rec {
|
||||
pname = "telegram-desktop";
|
||||
|
@ -1,4 +1,11 @@
|
||||
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, static ? stdenv.hostPlatform.isStatic }:
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, cmake
|
||||
, static ? stdenv.hostPlatform.isStatic
|
||||
, cxxStandard ? null
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "abseil-cpp";
|
||||
@ -21,8 +28,9 @@ stdenv.mkDerivation rec {
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DCMAKE_CXX_STANDARD=17"
|
||||
"-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
|
||||
] ++ lib.optionals (cxxStandard != null) [
|
||||
"-DCMAKE_CXX_STANDARD=${cxxStandard}"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
@ -57,14 +57,13 @@ stdenv.mkDerivation rec {
|
||||
"-DgRPC_ABSL_PROVIDER=package"
|
||||
"-DBUILD_SHARED_LIBS=ON"
|
||||
"-DCMAKE_SKIP_BUILD_RPATH=OFF"
|
||||
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||
"-D_gRPC_PROTOBUF_PROTOC_EXECUTABLE=${buildPackages.protobuf}/bin/protoc"
|
||||
] ++ lib.optionals ((stdenv.hostPlatform.useLLVM or false) && lib.versionOlder stdenv.cc.cc.version "11.0") [
|
||||
# Needs to be compiled with -std=c++11 for clang < 11. Interestingly this is
|
||||
# only an issue with the useLLVM stdenv, not the darwin stdenv…
|
||||
# https://github.com/grpc/grpc/issues/26473#issuecomment-860885484
|
||||
(if (stdenv.hostPlatform.useLLVM or false) && lib.versionOlder stdenv.cc.cc.version "11.0"
|
||||
then "-DCMAKE_CXX_STANDARD=11"
|
||||
else "-DCMAKE_CXX_STANDARD=17")
|
||||
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||
"-D_gRPC_PROTOBUF_PROTOC_EXECUTABLE=${buildPackages.protobuf}/bin/protoc"
|
||||
"-DCMAKE_CXX_STANDARD=11"
|
||||
];
|
||||
|
||||
# CMake creates a build directory by default, this conflicts with the
|
||||
|
@ -5050,7 +5050,11 @@ with pkgs;
|
||||
|
||||
fcitx5-chinese-addons = libsForQt5.callPackage ../tools/inputmethods/fcitx5/fcitx5-chinese-addons.nix { };
|
||||
|
||||
fcitx5-mozc = libsForQt5.callPackage ../tools/inputmethods/fcitx5/fcitx5-mozc.nix { };
|
||||
fcitx5-mozc = libsForQt5.callPackage ../tools/inputmethods/fcitx5/fcitx5-mozc.nix {
|
||||
abseil-cpp = abseil-cpp.override {
|
||||
cxxStandard = "17";
|
||||
};
|
||||
};
|
||||
|
||||
fcitx5-configtool = libsForQt5.callPackage ../tools/inputmethods/fcitx5/fcitx5-configtool.nix { };
|
||||
|
||||
@ -31195,7 +31199,12 @@ with pkgs;
|
||||
|
||||
or-tools = callPackage ../development/libraries/science/math/or-tools {
|
||||
python = python3;
|
||||
abseil-cpp = abseil-cpp.override { static = true; };
|
||||
# or-tools builds with -std=c++17, so abseil-cpp must
|
||||
# also be built that way
|
||||
abseil-cpp = abseil-cpp.override {
|
||||
static = true;
|
||||
cxxStandard = "17";
|
||||
};
|
||||
};
|
||||
|
||||
rubiks = callPackage ../development/libraries/science/math/rubiks { };
|
||||
|
Loading…
Reference in New Issue
Block a user