ocamlPackages.hxd: 0.3.2 -> 0.3.3 (#364231)
[NixPkgs.git] / pkgs / development / ocaml-modules / piqi / default.nix
blob1c45d67324d60b1b4c19f42c64a55c3139aeedea
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   ocaml,
6   findlib,
7   which,
8   sedlex,
9   easy-format,
10   xmlm,
11   base64,
14 lib.throwIf (lib.versionAtLeast ocaml.version "5.0")
15   "piqi is not available for OCaml ${ocaml.version}"
17   stdenv.mkDerivation
18   rec {
19     version = "0.6.16";
20     pname = "piqi";
21     name = "ocaml${ocaml.version}-${pname}-${version}";
23     src = fetchFromGitHub {
24       owner = "alavrik";
25       repo = pname;
26       rev = "v${version}";
27       sha256 = "sha256-qE+yybTn+kzbY0h8udhZYO+GwQPI/J/6p3LMmF12cFU=";
28     };
30     nativeBuildInputs = [
31       ocaml
32       findlib
33       which
34     ];
35     propagatedBuildInputs = [
36       sedlex
37       xmlm
38       easy-format
39       base64
40     ];
42     strictDeps = true;
44     patches = [
45       ./no-stream.patch
46       ./no-ocamlpath-override.patch
47     ];
49     createFindlibDestdir = true;
51     postBuild = "make -C piqilib piqilib.cma";
53     installTargets = [
54       "install"
55       "ocaml-install"
56     ];
58     meta = with lib; {
59       homepage = "https://piqi.org";
60       description = "Universal schema language and a collection of tools built around it";
61       license = licenses.asl20;
62       maintainers = [ maintainers.maurer ];
63     };
64   }