2021-03-20 04:20:00 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, static ? stdenv.hostPlatform.isStatic }:
|
2019-03-27 00:02:15 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "abseil-cpp";
|
2021-02-13 19:58:22 +00:00
|
|
|
version = "20200923.3";
|
2019-03-27 00:02:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "abseil";
|
|
|
|
repo = "abseil-cpp";
|
2020-05-04 11:11:55 +01:00
|
|
|
rev = version;
|
2021-02-13 19:58:22 +00:00
|
|
|
sha256 = "1p4djhm1f011ficbjjxx3n8428p8481p20j4glpaawnpsi362hkl";
|
2019-03-27 00:02:15 +00:00
|
|
|
};
|
|
|
|
|
2021-02-13 19:58:22 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DCMAKE_CXX_STANDARD=17"
|
2021-03-20 04:20:00 +00:00
|
|
|
"-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
|
2021-02-13 19:58:22 +00:00
|
|
|
];
|
|
|
|
|
2019-03-27 00:02:15 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2019-03-27 00:02:15 +00:00
|
|
|
description = "An open-source collection of C++ code designed to augment the C++ standard library";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://abseil.io/";
|
2019-03-27 00:02:15 +00:00
|
|
|
license = licenses.asl20;
|
2020-05-04 11:11:55 +01:00
|
|
|
platforms = platforms.all;
|
2019-03-27 00:02:15 +00:00
|
|
|
maintainers = [ maintainers.andersk ];
|
|
|
|
};
|
|
|
|
}
|