2022-09-26 14:11:45 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2023-05-03 12:34:04 +00:00
|
|
|
, buildPackages
|
2023-02-22 19:49:46 +00:00
|
|
|
, cmake
|
2022-09-26 14:11:45 +00:00
|
|
|
, ninja
|
|
|
|
, fetchFromGitHub
|
2023-05-03 12:34:04 +00:00
|
|
|
, fetchpatch
|
2022-09-26 14:11:45 +00:00
|
|
|
}:
|
|
|
|
|
2023-05-03 12:34:04 +00:00
|
|
|
# Fix regression in precomputing CMAKE_SIZEOF_VOID_P
|
|
|
|
# See https://github.com/mesonbuild/meson/pull/11761
|
|
|
|
let fixedMeson =
|
|
|
|
buildPackages.meson.overrideAttrs (
|
|
|
|
{patches ? [], ...}: {
|
|
|
|
patches = patches ++ [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/mesonbuild/meson/commit/7c78c2b5a0314078bdabb998ead56925dc8b0fc0.patch";
|
|
|
|
sha256 = "sha256-vSnHhuOIXf/1X+bUkUmGND5b30ES0O8EDArwb4p2/w4=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
}
|
|
|
|
); in
|
|
|
|
|
2022-09-26 14:11:45 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "tomlplusplus";
|
2023-02-22 19:49:46 +00:00
|
|
|
version = "3.3.0";
|
2022-09-26 14:11:45 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "marzer";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-02-22 19:49:46 +00:00
|
|
|
hash = "sha256-INX8TOEumz4B5coSxhiV7opc3rYJuQXT2k1BJ3Aje1M=";
|
2022-09-26 14:11:45 +00:00
|
|
|
};
|
|
|
|
|
2023-05-03 12:34:04 +00:00
|
|
|
nativeBuildInputs = [ fixedMeson cmake ninja ];
|
2022-09-26 14:11:45 +00:00
|
|
|
|
|
|
|
meta = with lib;{
|
|
|
|
homepage = "https://github.com/marzer/tomlplusplus";
|
|
|
|
description = "Header-only TOML config file parser and serializer for C++17";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ Scrumplex ];
|
|
|
|
platforms = with platforms; unix;
|
|
|
|
};
|
|
|
|
}
|