Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 cmake,
6 ninja,
7 gitUpdater,
8}:
9
10stdenv.mkDerivation (finalAttrs: {
11 pname = "variant-lite";
12 version = "2.0.0";
13
14 src = fetchFromGitHub {
15 owner = "martinmoene";
16 repo = "variant-lite";
17 tag = "v${finalAttrs.version}";
18 hash = "sha256-zLyzNzeD0C4e7CYqCCsPzkqa2cH5pSbL9vNVIxdkEfc=";
19 };
20
21 nativeBuildInputs = [
22 cmake
23 ninja
24 ];
25
26 cmakeFlags = [
27 # https://github.com/martinmoene/variant-lite/issues/50
28 (lib.cmakeBool "VARIANT_LITE_OPT_BUILD_TESTS" false)
29 ];
30
31 doCheck = true;
32 passthru = {
33 updateScript = gitUpdater { rev-prefix = "v"; };
34 };
35
36 meta = {
37 description = "C++17-like variant, a type-safe union for C++98, C++11 and later in a single-file header-only library";
38 homepage = "https://github.com/martinmoene/variant-lite";
39 changelog = "https://github.com/martinmoene/variant-lite/blob/v${finalAttrs.version}/CHANGES.txt";
40 license = lib.licenses.boost;
41 maintainers = with lib.maintainers; [ titaniumtown ];
42 };
43})