Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 23.11-beta 44 lines 983 B view raw
1{ lib 2, stdenv 3, fetchFromGitHub 4, cmake 5, gtest 6, zlib 7}: 8 9stdenv.mkDerivation (finalAttrs: { 10 pname = "msgpack-c"; 11 version = "6.0.0"; 12 13 src = fetchFromGitHub { 14 owner = "msgpack"; 15 repo = "msgpack-c"; 16 rev = "refs/tags/c-${finalAttrs.version}"; 17 hash = "sha256-TfC37QKwqvHxsLPgsEqJYkb7mpRQekbntbBPV4v4FO8="; 18 }; 19 20 strictDeps = true; 21 22 nativeBuildInputs = [ 23 cmake 24 ]; 25 26 cmakeFlags = [ 27 "-DMSGPACK_BUILD_EXAMPLES=OFF" # examples are not installed even if built 28 ] ++ lib.optional (!finalAttrs.doCheck) "-DMSGPACK_BUILD_TESTS=OFF"; 29 30 checkInputs = [ 31 gtest 32 zlib 33 ]; 34 35 doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; 36 37 meta = with lib; { 38 description = "MessagePack implementation for C"; 39 homepage = "https://github.com/msgpack/msgpack-c"; 40 changelog = "https://github.com/msgpack/msgpack-c/blob/${finalAttrs.src.rev}/CHANGELOG.md"; 41 license = licenses.boost; 42 maintainers = with maintainers; [ nickcao ]; 43 }; 44})