variant-lite: init at 2.0.0

This commit is contained in:
Simon Gardling
2025-02-07 13:06:44 -05:00
parent 91f1e05e59
commit 77ad0f574f
+43
View File
@@ -0,0 +1,43 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
ninja,
gitUpdater,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "variant-lite";
version = "2.0.0";
src = fetchFromGitHub {
owner = "martinmoene";
repo = "variant-lite";
tag = "v${finalAttrs.version}";
hash = "sha256-zLyzNzeD0C4e7CYqCCsPzkqa2cH5pSbL9vNVIxdkEfc=";
};
nativeBuildInputs = [
cmake
ninja
];
cmakeFlags = [
# https://github.com/martinmoene/variant-lite/issues/50
(lib.cmakeBool "VARIANT_LITE_OPT_BUILD_TESTS" false)
];
doCheck = true;
passthru = {
updateScript = gitUpdater { rev-prefix = "v"; };
};
meta = {
description = "A C++17-like variant, a type-safe union for C++98, C++11 and later in a single-file header-only library";
homepage = "https://github.com/martinmoene/variant-lite";
changelog = "https://github.com/martinmoene/variant-lite/blob/v${finalAttrs.version}/CHANGES.txt";
license = lib.licenses.boost;
maintainers = with lib.maintainers; [ titaniumtown ];
};
})