Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at release-19.03 39 lines 1.1 kB view raw
1{ stdenv, makeWrapper, fetchFromGitHub, ocaml, findlib, dune 2, menhir, merlin_extend, ppx_tools_versioned, utop 3}: 4 5stdenv.mkDerivation rec { 6 name = "ocaml${ocaml.version}-reason-${version}"; 7 version = "3.3.7"; 8 9 src = fetchFromGitHub { 10 owner = "facebook"; 11 repo = "reason"; 12 rev = "4d20e5b535c29c5ef1283e65958b32996e449e5a"; 13 sha256 = "0f3pb61wg58g8f3wcnp1h4gpmnwmp7bq0cnqdfwldmh9cs0dqyfk"; 14 }; 15 16 nativeBuildInputs = [ makeWrapper ]; 17 18 propagatedBuildInputs = [ menhir merlin_extend ppx_tools_versioned ]; 19 20 buildInputs = [ ocaml findlib dune utop menhir ]; 21 22 buildFlags = [ "build" ]; # do not "make tests" before reason lib is installed 23 24 inherit (dune) installPhase; 25 26 postInstall = '' 27 wrapProgram $out/bin/rtop \ 28 --prefix PATH : "${utop}/bin" \ 29 --set OCAMLPATH $out/lib/ocaml/${ocaml.version}/site-lib:$OCAMLPATH 30 ''; 31 32 meta = with stdenv.lib; { 33 homepage = https://reasonml.github.io/; 34 description = "Facebook's friendly syntax to OCaml"; 35 license = licenses.mit; 36 inherit (ocaml.meta) platforms; 37 maintainers = [ maintainers.volth ]; 38 }; 39}