Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchFromGitHub, ocaml, findlib, which, sedlex, easy-format, xmlm, base64 }:
2
3stdenv.mkDerivation rec {
4 version = "0.6.16";
5 pname = "piqi";
6 name = "ocaml${ocaml.version}-${pname}-${version}";
7
8 src = fetchFromGitHub {
9 owner = "alavrik";
10 repo = pname;
11 rev = "v${version}";
12 sha256 = "sha256-qE+yybTn+kzbY0h8udhZYO+GwQPI/J/6p3LMmF12cFU=";
13 };
14
15 nativeBuildInputs = [ ocaml findlib which ];
16 propagatedBuildInputs = [ sedlex xmlm easy-format base64 ];
17
18 strictDeps = true;
19
20 patches = [ ./no-stream.patch ./no-ocamlpath-override.patch ];
21
22 createFindlibDestdir = true;
23
24 postBuild = "make -C piqilib piqilib.cma";
25
26 installTargets = [ "install" "ocaml-install" ];
27
28 meta = with lib; {
29 homepage = "https://piqi.org";
30 description = "Universal schema language and a collection of tools built around it";
31 license = licenses.asl20;
32 maintainers = [ maintainers.maurer ];
33 };
34}