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