Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchFromGitHub, fetchpatch, ocaml, findlib, piqi, stdlib-shims, num }:
2
3stdenv.mkDerivation rec {
4 version = "0.7.8";
5 pname = "piqi-ocaml";
6 name = "ocaml${ocaml.version}-${pname}-${version}";
7
8 src = fetchFromGitHub {
9 owner = "alavrik";
10 repo = pname;
11 rev = "v${version}";
12 sha256 = "sha256-6Luq49sbo+AqLSq57mc6fLhrRx0K6G5LCUIzkGPfqYo=";
13 };
14
15 nativeBuildInputs = [ ocaml findlib ];
16 buildInputs = [ piqi stdlib-shims ];
17
18 checkInputs = [ num ];
19
20 strictDeps = true;
21
22 createFindlibDestdir = true;
23
24 installPhase = ''
25 runHook preInstall
26 DESTDIR=$out make install
27 runHook postInstall
28 '';
29
30 meta = with lib; {
31 description = "Universal schema language and a collection of tools built around it. These are the ocaml bindings";
32 homepage = "https://piqi.org";
33 license = licenses.asl20;
34 maintainers = [ maintainers.maurer ];
35 mainProgram = "piqic-ocaml";
36 };
37}