about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/abseil-cpp
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/abseil-cpp')
-rw-r--r--nixpkgs/pkgs/development/libraries/abseil-cpp/202103.nix63
-rw-r--r--nixpkgs/pkgs/development/libraries/abseil-cpp/202111.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/abseil-cpp/202206.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/abseil-cpp/202301.nix48
-rw-r--r--nixpkgs/pkgs/development/libraries/abseil-cpp/202308.nix42
-rw-r--r--nixpkgs/pkgs/development/libraries/abseil-cpp/cmake-core-foundation.patch12
6 files changed, 249 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/abseil-cpp/202103.nix b/nixpkgs/pkgs/development/libraries/abseil-cpp/202103.nix
new file mode 100644
index 000000000000..59294496f80a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/abseil-cpp/202103.nix
@@ -0,0 +1,63 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, static ? stdenv.hostPlatform.isStatic
+, cxxStandard ? null
+}:
+
+stdenv.mkDerivation rec {
+  pname = "abseil-cpp";
+  version = "20210324.2";
+
+  src = fetchFromGitHub {
+    owner = "abseil";
+    repo = "abseil-cpp";
+    rev = version;
+    sha256 = "sha256-fcxPhuI2eL/fnd6nT11p8DpUNwGNaXZmd03yOiZcOT0=";
+  };
+
+  patches = [
+    # Use CMAKE_INSTALL_FULL_{LIBDIR,INCLUDEDIR}
+    # https://github.com/abseil/abseil-cpp/pull/963
+    (fetchpatch {
+      url = "https://github.com/abseil/abseil-cpp/commit/5bfa70c75e621c5d5ec095c8c4c0c050dcb2957e.patch";
+      sha256 = "0nhjxqfxpi2pkfinnqvd5m4npf9l1kg39mjx9l3087ajhadaywl5";
+    })
+
+    # Bacport gcc-13 fix:
+    #   https://github.com/abseil/abseil-cpp/pull/1187
+    (fetchpatch {
+      name = "gcc-13.patch";
+      url = "https://github.com/abseil/abseil-cpp/commit/36a4b073f1e7e02ed7d1ac140767e36f82f09b7c.patch";
+      hash = "sha256-aA7mwGEtv/cQINcawjkukmCvfNuqwUeDFssSiNKPdgg=";
+    })
+  ] ++ lib.optionals stdenv.hostPlatform.isLoongArch64 [
+    # https://github.com/abseil/abseil-cpp/pull/1110
+    (fetchpatch {
+      url = "https://github.com/abseil/abseil-cpp/commit/808bc202fc13e85a7948db0d7fb58f0f051200b1.patch";
+      sha256 = "sha256-ayY/aV/xWOdEyFSDqV7B5WDGvZ0ASr/aeBeYwP5RZVc=";
+    })
+  ] ++ lib.optionals stdenv.isDarwin [
+    # Don’t propagate the path to CoreFoundation. Otherwise, it’s impossible to build packages
+    # that require a different SDK other than the default one.
+    ./cmake-core-foundation.patch
+  ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
+  ] ++ lib.optionals (cxxStandard != null) [
+    "-DCMAKE_CXX_STANDARD=${cxxStandard}"
+  ];
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "An open-source collection of C++ code designed to augment the C++ standard library";
+    homepage = "https://abseil.io/";
+    license = licenses.asl20;
+    platforms = platforms.all;
+    maintainers = [ maintainers.andersk ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/abseil-cpp/202111.nix b/nixpkgs/pkgs/development/libraries/abseil-cpp/202111.nix
new file mode 100644
index 000000000000..0c1a173eca44
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/abseil-cpp/202111.nix
@@ -0,0 +1,42 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, static ? stdenv.hostPlatform.isStatic
+, cxxStandard ? null
+}:
+
+stdenv.mkDerivation rec {
+  pname = "abseil-cpp";
+  version = "20211102.0";
+
+  src = fetchFromGitHub {
+    owner = "abseil";
+    repo = "abseil-cpp";
+    rev = version;
+    sha256 = "sha256-sSXT6D4JSrk3dA7kVaxfKkzOMBpqXQb0WbMYWG+nGwk=";
+  };
+
+  patches = lib.optionals stdenv.isDarwin [
+    # Don’t propagate the path to CoreFoundation. Otherwise, it’s impossible to build packages
+    # that require a different SDK other than the default one.
+    ./cmake-core-foundation.patch
+  ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
+  ] ++ lib.optionals (cxxStandard != null) [
+    "-DCMAKE_CXX_STANDARD=${cxxStandard}"
+  ];
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "An open-source collection of C++ code designed to augment the C++ standard library";
+    homepage = "https://abseil.io/";
+    license = licenses.asl20;
+    platforms = platforms.all;
+    maintainers = [ maintainers.andersk ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/abseil-cpp/202206.nix b/nixpkgs/pkgs/development/libraries/abseil-cpp/202206.nix
new file mode 100644
index 000000000000..a605be3c05ed
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/abseil-cpp/202206.nix
@@ -0,0 +1,42 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, cmake
+, static ? stdenv.hostPlatform.isStatic
+, cxxStandard ? null
+}:
+
+stdenv.mkDerivation rec {
+  pname = "abseil-cpp";
+  version = "20220623.1";
+
+  src = fetchFromGitHub {
+    owner = "abseil";
+    repo = "abseil-cpp";
+    rev = "refs/tags/${version}";
+    hash = "sha256-Od1FZOOWEXVQsnZBwGjDIExi6LdYtomyL0STR44SsG8=";
+  };
+
+  patches = lib.optionals stdenv.isDarwin [
+    # Don’t propagate the path to CoreFoundation. Otherwise, it’s impossible to build packages
+    # that require a different SDK other than the default one.
+    ./cmake-core-foundation.patch
+  ];
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
+  ] ++ lib.optionals (cxxStandard != null) [
+    "-DCMAKE_CXX_STANDARD=${cxxStandard}"
+  ];
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    description = "An open-source collection of C++ code designed to augment the C++ standard library";
+    homepage = "https://abseil.io/";
+    license = licenses.asl20;
+    platforms = platforms.all;
+    maintainers = [ maintainers.andersk ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/abseil-cpp/202301.nix b/nixpkgs/pkgs/development/libraries/abseil-cpp/202301.nix
new file mode 100644
index 000000000000..4676264c26d7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/abseil-cpp/202301.nix
@@ -0,0 +1,48 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, gtest
+, static ? stdenv.hostPlatform.isStatic
+, cxxStandard ? null
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "abseil-cpp";
+  version = "20230125.3";
+
+  src = fetchFromGitHub {
+    owner = "abseil";
+    repo = "abseil-cpp";
+    rev = "refs/tags/${finalAttrs.version}";
+    hash = "sha256-PLoI7ix+reUqkZ947kWzls8lujYqWXk9A9a55UcfahI=";
+  };
+
+  patches = lib.optionals stdenv.isDarwin [
+    # Don’t propagate the path to CoreFoundation. Otherwise, it’s impossible to build packages
+    # that require a different SDK other than the default one.
+    ./cmake-core-foundation.patch
+  ];
+
+  cmakeFlags = [
+    "-DABSL_BUILD_TEST_HELPERS=ON"
+    "-DABSL_USE_EXTERNAL_GOOGLETEST=ON"
+    "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
+  ] ++ lib.optionals (cxxStandard != null) [
+    "-DCMAKE_CXX_STANDARD=${cxxStandard}"
+  ];
+
+  strictDeps = true;
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ gtest ];
+
+  meta = with lib; {
+    description = "An open-source collection of C++ code designed to augment the C++ standard library";
+    homepage = "https://abseil.io/";
+    license = licenses.asl20;
+    platforms = platforms.all;
+    maintainers = [ maintainers.andersk ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/abseil-cpp/202308.nix b/nixpkgs/pkgs/development/libraries/abseil-cpp/202308.nix
new file mode 100644
index 000000000000..7ec0ac8a775f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/abseil-cpp/202308.nix
@@ -0,0 +1,42 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, gtest
+, static ? stdenv.hostPlatform.isStatic
+, cxxStandard ? null
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "abseil-cpp";
+  version = "20230802.1";
+
+  src = fetchFromGitHub {
+    owner = "abseil";
+    repo = "abseil-cpp";
+    rev = "refs/tags/${finalAttrs.version}";
+    hash = "sha256-uNGrTNg5G5xFGtc+BSWE389x0tQ/KxJQLHfebNWas/k=";
+  };
+
+  cmakeFlags = [
+    "-DABSL_BUILD_TEST_HELPERS=ON"
+    "-DABSL_USE_EXTERNAL_GOOGLETEST=ON"
+    "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
+  ] ++ lib.optionals (cxxStandard != null) [
+    "-DCMAKE_CXX_STANDARD=${cxxStandard}"
+  ];
+
+  strictDeps = true;
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ gtest ];
+
+  meta = with lib; {
+    description = "An open-source collection of C++ code designed to augment the C++ standard library";
+    homepage = "https://abseil.io/";
+    license = licenses.asl20;
+    platforms = platforms.all;
+    maintainers = [ maintainers.andersk ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/libraries/abseil-cpp/cmake-core-foundation.patch b/nixpkgs/pkgs/development/libraries/abseil-cpp/cmake-core-foundation.patch
new file mode 100644
index 000000000000..61b57456b3fc
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/abseil-cpp/cmake-core-foundation.patch
@@ -0,0 +1,12 @@
+diff -ur a/absl/time/CMakeLists.txt b/absl/time/CMakeLists.txt
+--- a/absl/time/CMakeLists.txt	1969-12-31 19:00:01.000000000 -0500
++++ b/absl/time/CMakeLists.txt	2023-10-30 21:50:32.639061785 -0400
+@@ -55,7 +55,7 @@
+ )
+ 
+ if(APPLE)
+-  find_library(CoreFoundation CoreFoundation)
++  set(CoreFoundation "-framework CoreFoundation")
+ endif()
+ 
+ absl_cc_library(