Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 cmake, 6 libcxxCmakeModule ? false, 7}: 8 9stdenv.mkDerivation { 10 pname = "cpptoml"; 11 version = "0.4.0"; 12 13 src = fetchFromGitHub { 14 owner = "skystrife"; 15 repo = "cpptoml"; 16 rev = "fededad7169e538ca47e11a9ee9251bc361a9a65"; 17 sha256 = "0zlgdlk9nsskmr8xc2ajm6mn1x5wz82ssx9w88s02icz71mcihrx"; 18 }; 19 20 patches = [ 21 # Fix compilation with GCC 11. 22 # <https://github.com/skystrife/cpptoml/pull/123> 23 ./add-limits-include.patch 24 ]; 25 26 nativeBuildInputs = [ cmake ]; 27 28 cmakeFlags = [ 29 # If this package is built with clang it will attempt to 30 # use libcxx via the Cmake find_package interface. 31 # The default libcxx stdenv in llvmPackages doesn't provide 32 # this and so will fail. 33 "-DENABLE_LIBCXX=${if libcxxCmakeModule then "ON" else "OFF"}" 34 "-DCPPTOML_BUILD_EXAMPLES=OFF" 35 ]; 36 37 meta = with lib; { 38 description = "C++ TOML configuration library"; 39 homepage = "https://github.com/skystrife/cpptoml"; 40 license = licenses.mit; 41 maintainers = with maintainers; [ photex ]; 42 platforms = platforms.all; 43 }; 44}