1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ lib ,
3
+ stdenv ,
4
+ fetchFromGitHub ,
5
+ cmake ,
6
+ gtest ,
7
+ static ? stdenv . hostPlatform . isStatic ,
8
+ cxxStandard ? null ,
9
+ } :
10
+
11
+ stdenv . mkDerivation ( finalAttrs : {
12
+ pname = "abseil-cpp" ;
13
+ version = "20250127.1" ;
14
+
15
+ src = fetchFromGitHub {
16
+ owner = "abseil" ;
17
+ repo = "abseil-cpp" ;
18
+ tag = finalAttrs . version ;
19
+ hash = "sha256-QTywqQCkyGFpdbtDBvUwz9bGXxbJs/qoFKF6zYAZUmQ=" ;
20
+ } ;
21
+
22
+ cmakeFlags =
23
+ [
24
+ ( lib . cmakeBool "ABSL_BUILD_TEST_HELPERS" true )
25
+ ( lib . cmakeBool "ABSL_USE_EXTERNAL_GOOGLETEST" true )
26
+ ( lib . cmakeBool "BUILD_SHARED_LIBS" ( ! static ) )
27
+ ]
28
+ ++ lib . optionals ( cxxStandard != null ) [
29
+ ( lib . cmakeFeature "CMAKE_CXX_STANDARD" cxxStandard )
30
+ ] ;
31
+
32
+ strictDeps = true ;
33
+
34
+ nativeBuildInputs = [ cmake ] ;
35
+
36
+ buildInputs = [ gtest ] ;
37
+
38
+ meta = {
39
+ description = "Open-source collection of C++ code designed to augment the C++ standard library" ;
40
+ homepage = "https://abseil.io/" ;
41
+ changelog = "https://github.com/abseil/abseil-cpp/releases/tag/${ finalAttrs . version } " ;
42
+ license = lib . licenses . asl20 ;
43
+ platforms = lib . platforms . all ;
44
+ maintainers = [ lib . maintainers . GaetanLepage ] ;
45
+ } ;
46
+ } )
0 commit comments