aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/ocaml-modules/piqi/default.nix
blob: c492035f4f95e9d9a4ad501f34103e200698888e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ stdenv, fetchurl, ocaml, findlib, which, ulex, easy-format, ocaml_optcomp, xmlm, base64 }:

stdenv.mkDerivation rec {
  version = "0.6.14";
  pname = "piqi";
 
  src = fetchurl {
    url = "https://github.com/alavrik/piqi/archive/v${version}.tar.gz";
    sha256 = "1ssccnwqzfyf7syfq2fv4zyhwayxwd75rhq9y28mvq1w6qbww4l7";
  };

  buildInputs = [ ocaml findlib which ocaml_optcomp ];
  propagatedBuildInputs = [ulex xmlm easy-format base64];

  patches = [ ./no-ocamlpath-override.patch ];

  createFindlibDestdir = true;

  buildPhase = ''
    make
    make -C piqilib piqilib.cma
  '';

  installPhase = ''
    make install;
    make ocaml-install;
  '';

  meta = with stdenv.lib; {
    homepage = "http://piqi.org";
    description = "Universal schema language and a collection of tools built around it";
    license = licenses.asl20;
    maintainers = [ maintainers.maurer ];
  };
}