1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 06:31:02 +00:00

abseil-cpp: add cxxStandard input

This commit is contained in:
Phillip Cloud 2021-10-31 06:02:08 -04:00
parent 7053541084
commit af3444ffc5
No known key found for this signature in database
GPG key ID: D908212070FD785E

View file

@ -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 ];