···1+{ lib
2+, stdenv
3+, fetchFromGitHub
4+}:
5+6+stdenv.mkDerivation rec {
7+ pname = "mlib";
8+ version = "0.6.0";
9+10+ src = fetchFromGitHub {
11+ owner = "P-p-H-d";
12+ repo = pname;
13+ rev = "V${version}";
14+ hash = "sha256-LoDw9nQdEtXuTs0wncScrc2+Z7BW61ps5ee9OfQE4M0=";
15+ };
16+17+ makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "PREFIX=$(out)" ];
18+19+ doCheck = true;
20+21+ meta = with lib; {
22+ description = "Library of generic and type safe containers in pure C language";
23+ longDescription = ''
24+ M*LIB (M star lib) is a C library enabling to define and use generic and
25+ type safe container, aka handling generic containers in in pure C
26+ language. The objects within the containers can be trivial or very
27+ complex: they can have their own constructor, destructor, operators or can
28+ be basic C type like the C type 'int'. This makes it possible to construct
29+ fully recursive objects (container-of[...]-container-of-type-T), without
30+ erasing type information (typically using void pointers or resorting to C
31+ macro to access the container).
32+ '';
33+ homepage = "https://github.com/P-p-H-d/mlib";
34+ changelog = "https://github.com/P-p-H-d/mlib/releases/tag/${src.rev}";
35+ license = licenses.bsd2;
36+ maintainers = with maintainers; [ azahi ];
37+ platforms = platforms.unix;
38+ };
39+}