nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 cmake,
6 pkg-config,
7}:
8
9stdenv.mkDerivation (finalAttrs: {
10 pname = "msgpuck";
11 version = "2.0";
12
13 src = fetchFromGitHub {
14 owner = "rtsisyk";
15 repo = "msgpuck";
16 rev = finalAttrs.version;
17 sha256 = "0cjq86kncn3lv65vig9cqkqqv2p296ymcjjbviw0j1s85cfflps0";
18 };
19
20 outputs = [
21 "out"
22 "dev"
23 ];
24
25 nativeBuildInputs = [
26 cmake
27 pkg-config
28 ];
29
30 postPatch = ''
31 substituteInPlace CMakeLists.txt \
32 --replace-fail "cmake_minimum_required(VERSION 2.8.5)" "cmake_minimum_required(VERSION 3.10)"
33 substituteInPlace test/CMakeLists.txt \
34 --replace-fail "cmake_policy(SET CMP0037 OLD)" "cmake_policy(SET CMP0037 NEW)"
35 '';
36
37 meta = {
38 description = "Simple and efficient MsgPack binary serialization library in a self-contained header file";
39 homepage = "https://github.com/rtsisyk/msgpuck";
40 license = lib.licenses.bsd2;
41 platforms = lib.platforms.all;
42 maintainers = with lib.maintainers; [ izorkin ];
43 };
44})