abseil-cpp: add cxxStandard input

This commit is contained in:
Phillip Cloud
2021-11-01 11:50:18 -04:00
parent 7053541084
commit af3444ffc5
@@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, static ? stdenv.hostPlatform.isStatic }:
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, static ? stdenv.hostPlatform.isStatic, cxxStandard ? null }:
stdenv.mkDerivation rec {
pname = "abseil-cpp";
@@ -21,8 +21,9 @@ stdenv.mkDerivation rec {
];
cmakeFlags = [
"-DCMAKE_CXX_STANDARD=17"
"-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
] ++ lib.optionals (cxxStandard != null) [
"-DCMAKE_CXX_STANDARD=${toString cxxStandard}"
];
nativeBuildInputs = [ cmake ];