about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/ocaml-modules/piqi/default.nix
blob: 45d65a5be04f4441e3f2dc9e4bbbee0da0e41680 (plain) (blame)
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
{ lib, stdenv, fetchFromGitHub, ocaml, findlib, which, sedlex_2, easy-format, xmlm, base64 }:

stdenv.mkDerivation rec {
  version = "0.6.15";
  pname = "piqi";
  name = "ocaml${ocaml.version}-${pname}-${version}";

  src = fetchFromGitHub {
    owner = "alavrik";
    repo = pname;
    rev = "v${version}";
    sha256 = "0v04hs85xv6d4ysqxyv1dik34dx49yab9shpi4x7iv19qlzl7csb";
  };

  nativeBuildInputs = [ ocaml findlib which ];
  propagatedBuildInputs = [ sedlex_2 xmlm easy-format base64 ];

  strictDeps = true;

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

  createFindlibDestdir = true;

  postBuild = "make -C piqilib piqilib.cma";

  installTargets = [ "install" "ocaml-install" ];

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