···11+{ lib
22+, stdenv
33+, fetchFromGitHub
44+}:
55+66+stdenv.mkDerivation rec {
77+ pname = "mlib";
88+ version = "0.6.0";
99+1010+ src = fetchFromGitHub {
1111+ owner = "P-p-H-d";
1212+ repo = pname;
1313+ rev = "V${version}";
1414+ hash = "sha256-LoDw9nQdEtXuTs0wncScrc2+Z7BW61ps5ee9OfQE4M0=";
1515+ };
1616+1717+ makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "PREFIX=$(out)" ];
1818+1919+ doCheck = true;
2020+2121+ meta = with lib; {
2222+ description = "Library of generic and type safe containers in pure C language";
2323+ longDescription = ''
2424+ M*LIB (M star lib) is a C library enabling to define and use generic and
2525+ type safe container, aka handling generic containers in in pure C
2626+ language. The objects within the containers can be trivial or very
2727+ complex: they can have their own constructor, destructor, operators or can
2828+ be basic C type like the C type 'int'. This makes it possible to construct
2929+ fully recursive objects (container-of[...]-container-of-type-T), without
3030+ erasing type information (typically using void pointers or resorting to C
3131+ macro to access the container).
3232+ '';
3333+ homepage = "https://github.com/P-p-H-d/mlib";
3434+ changelog = "https://github.com/P-p-H-d/mlib/releases/tag/${src.rev}";
3535+ license = licenses.bsd2;
3636+ maintainers = with maintainers; [ azahi ];
3737+ platforms = platforms.unix;
3838+ };
3939+}