@@ -0,0 +1,30 @@
1+{stdenv, fetchurl, ocaml, findlib, camlp4, which, ulex, easy-format, ocaml_optcomp, xmlm, base64}:
2+
3+stdenv.mkDerivation rec {
4+ version = "0.6.12";
5+ name = "piqi-${version}";
6+
7+ src = fetchurl {
8+ url = "https://github.com/alavrik/piqi/archive/v${version}.tar.gz";
9+ sha256 = "1ifnawnblvibf5rgp6gr4f20266dckfrlryikg1iiq3dx2wfl7f8";
10+ };
11+
12+ buildInputs = [ocaml findlib camlp4 which ocaml_optcomp base64];
13+ propagatedBuildInputs = [ulex xmlm easy-format];
14+
15+ patches = [ ./no-ocamlpath-override.patch ];
16+
17+ createFindlibDestdir = true;
18+
19+ installPhase = ''
20+ make install;
21+ make ocaml-install;
22+ '';
23+
24+ meta = with stdenv.lib; {
25+ homepage = http://piqi.org;
26+ description = "Universal schema language and a collection of tools built around it.";
27+ license = licenses.asl20;
28+ maintainers = [ maintainers.maurer ];
29+ };
30+}