From 612c63c9b03050b8d58efb281892d5cf12ea0cc0 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Sun, 25 Jan 2026 18:15:06 -0800 Subject: [PATCH] abseil-cpp: Rename to abseil-cpp_202508 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some packages, such as or-tools, strictly require a specific LTS branch of abseil-cpp, and will be broken by arbitrary upgrades. See also https://abseil.io/about/compatibility, which confirms “Each LTS release should be considered to be a new major version of the library.” Signed-off-by: Anders Kaseorg --- pkgs/by-name/ab/abseil-cpp/package.nix | 56 +++---------------- pkgs/by-name/ab/abseil-cpp_202508/package.nix | 50 +++++++++++++++++ 2 files changed, 57 insertions(+), 49 deletions(-) create mode 100644 pkgs/by-name/ab/abseil-cpp_202508/package.nix diff --git a/pkgs/by-name/ab/abseil-cpp/package.nix b/pkgs/by-name/ab/abseil-cpp/package.nix index 5419ae381c67..8e26cb30a690 100644 --- a/pkgs/by-name/ab/abseil-cpp/package.nix +++ b/pkgs/by-name/ab/abseil-cpp/package.nix @@ -1,50 +1,8 @@ -{ - lib, - stdenv, - fetchFromGitHub, - cmake, - gtest, - static ? stdenv.hostPlatform.isStatic, - cxxStandard ? null, -}: +# Some packages, such as or-tools, strictly require a specific LTS +# branch of abseil-cpp, and will be broken by arbitrary upgrades. See +# also https://abseil.io/about/compatibility, which confirms “Each LTS +# release should be considered to be a new major version of the +# library.” Therefore, we keep packages `abseil-cpp_YYYYMM` for each +# required LTS branch, leaving `abseil-cpp` as an alias. -stdenv.mkDerivation (finalAttrs: { - pname = "abseil-cpp"; - version = "20250814.1"; - - src = fetchFromGitHub { - owner = "abseil"; - repo = "abseil-cpp"; - tag = finalAttrs.version; - hash = "sha256-SCQDORhmJmTb0CYm15zjEa7dkwc+lpW2s1d4DsMRovI="; - }; - - outputs = [ - "out" - "dev" - ]; - - cmakeFlags = [ - (lib.cmakeBool "ABSL_BUILD_TEST_HELPERS" true) - (lib.cmakeBool "ABSL_USE_EXTERNAL_GOOGLETEST" true) - (lib.cmakeBool "BUILD_SHARED_LIBS" (!static)) - ] - ++ lib.optionals (cxxStandard != null) [ - (lib.cmakeFeature "CMAKE_CXX_STANDARD" cxxStandard) - ]; - - strictDeps = true; - - nativeBuildInputs = [ cmake ]; - - buildInputs = [ gtest ]; - - meta = { - description = "Open-source collection of C++ code designed to augment the C++ standard library"; - homepage = "https://abseil.io/"; - changelog = "https://github.com/abseil/abseil-cpp/releases/tag/${finalAttrs.version}"; - license = lib.licenses.asl20; - platforms = lib.platforms.all; - maintainers = [ lib.maintainers.GaetanLepage ]; - }; -}) +{ abseil-cpp_202508 }: abseil-cpp_202508 diff --git a/pkgs/by-name/ab/abseil-cpp_202508/package.nix b/pkgs/by-name/ab/abseil-cpp_202508/package.nix new file mode 100644 index 000000000000..5419ae381c67 --- /dev/null +++ b/pkgs/by-name/ab/abseil-cpp_202508/package.nix @@ -0,0 +1,50 @@ +{ + lib, + stdenv, + fetchFromGitHub, + cmake, + gtest, + static ? stdenv.hostPlatform.isStatic, + cxxStandard ? null, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "abseil-cpp"; + version = "20250814.1"; + + src = fetchFromGitHub { + owner = "abseil"; + repo = "abseil-cpp"; + tag = finalAttrs.version; + hash = "sha256-SCQDORhmJmTb0CYm15zjEa7dkwc+lpW2s1d4DsMRovI="; + }; + + outputs = [ + "out" + "dev" + ]; + + cmakeFlags = [ + (lib.cmakeBool "ABSL_BUILD_TEST_HELPERS" true) + (lib.cmakeBool "ABSL_USE_EXTERNAL_GOOGLETEST" true) + (lib.cmakeBool "BUILD_SHARED_LIBS" (!static)) + ] + ++ lib.optionals (cxxStandard != null) [ + (lib.cmakeFeature "CMAKE_CXX_STANDARD" cxxStandard) + ]; + + strictDeps = true; + + nativeBuildInputs = [ cmake ]; + + buildInputs = [ gtest ]; + + meta = { + description = "Open-source collection of C++ code designed to augment the C++ standard library"; + homepage = "https://abseil.io/"; + changelog = "https://github.com/abseil/abseil-cpp/releases/tag/${finalAttrs.version}"; + license = lib.licenses.asl20; + platforms = lib.platforms.all; + maintainers = [ lib.maintainers.GaetanLepage ]; + }; +})