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.nix59
-rw-r--r--nixpkgs/pkgs/development/libraries/abseil-cpp/202111.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/abseil-cpp/202206.nix36
-rw-r--r--nixpkgs/pkgs/development/libraries/abseil-cpp/202301.nix35
-rw-r--r--nixpkgs/pkgs/development/libraries/abseil-cpp/cmake-full-dirs.patch15
5 files changed, 181 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..712f89e383ff
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/abseil-cpp/202103.nix
@@ -0,0 +1,59 @@
+{ 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=";
+    })
+  ];
+
+  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..d40ca0bd4ab2
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/abseil-cpp/202111.nix
@@ -0,0 +1,36 @@
+{ 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=";
+  };
+
+  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..7ca25f414040
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/abseil-cpp/202206.nix
@@ -0,0 +1,36 @@
+{ 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=";
+  };
+
+  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..a1c42c5df4b4
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/abseil-cpp/202301.nix
@@ -0,0 +1,35 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, 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=";
+  };
+
+  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/cmake-full-dirs.patch b/nixpkgs/pkgs/development/libraries/abseil-cpp/cmake-full-dirs.patch
new file mode 100644
index 000000000000..c18420711b90
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/abseil-cpp/cmake-full-dirs.patch
@@ -0,0 +1,15 @@
+diff --git a/CMake/AbseilHelpers.cmake b/CMake/AbseilHelpers.cmake
+index 1a80b5b..1fa57a7 100644
+--- a/CMake/AbseilHelpers.cmake
++++ b/CMake/AbseilHelpers.cmake
+@@ -171,8 +171,8 @@ function(absl_cc_library)
+       FILE(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/lib/pkgconfig/absl_${_NAME}.pc" CONTENT "\
+ prefix=${CMAKE_INSTALL_PREFIX}\n\
+ exec_prefix=\${prefix}\n\
+-libdir=\${prefix}/${CMAKE_INSTALL_LIBDIR}\n\
+-includedir=\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}\n\
++libdir=${CMAKE_INSTALL_FULL_LIBDIR}\n\
++includedir=${CMAKE_INSTALL_FULL_INCLUDEDIR}\n\
+ \n\
+ Name: absl_${_NAME}\n\
+ Description: Abseil ${_NAME} library\n\