1{ lib, stdenv, fetchFromGitHub, cmake, libcxxCmakeModule ? false }:
2
3stdenv.mkDerivation rec {
4 pname = "cpptoml";
5 version = "0.4.0";
6
7 src = fetchFromGitHub {
8 owner = "skystrife";
9 repo = "cpptoml";
10 rev = "fededad7169e538ca47e11a9ee9251bc361a9a65";
11 sha256 = "0zlgdlk9nsskmr8xc2ajm6mn1x5wz82ssx9w88s02icz71mcihrx";
12 };
13
14 nativeBuildInputs = [ cmake ];
15
16 cmakeFlags = [
17 # If this package is built with clang it will attempt to
18 # use libcxx via the Cmake find_package interface.
19 # The default libcxx stdenv in llvmPackages doesn't provide
20 # this and so will fail.
21 "-DENABLE_LIBCXX=${if libcxxCmakeModule then "ON" else "OFF"}"
22 "-DCPPTOML_BUILD_EXAMPLES=OFF"
23 ];
24
25 meta = with lib; {
26 description = "C++ TOML configuration library";
27 homepage = "https://github.com/skystrife/cpptoml";
28 license = licenses.mit;
29 maintainers = with maintainers; [ photex ];
30 platforms = platforms.all;
31 };
32}