|
1 |
| -{ stdenv, buildOcaml, fetchFromGitHub, ocaml, findlib |
2 |
| -, cstruct, zarith, ounit, ocaml_oasis, ppx_sexp_conv, sexplib |
3 |
| -, lwt ? null}: |
| 1 | +{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, opam, topkg |
| 2 | +, cpuid, ocb-stubblr |
| 3 | +, cstruct, zarith, ocaml_oasis, ppx_sexp_conv, sexplib |
| 4 | +, lwt ? null |
| 5 | +}: |
4 | 6 |
|
5 | 7 | with stdenv.lib;
|
6 | 8 | let withLwt = lwt != null; in
|
7 | 9 |
|
8 |
| -buildOcaml rec { |
9 |
| - name = "nocrypto"; |
10 |
| - version = "0.5.3"; |
11 |
| - |
12 |
| - minimumSupportedOcamlVersion = "4.02"; |
| 10 | +stdenv.mkDerivation rec { |
| 11 | + name = "ocaml${ocaml.version}-nocrypto-${version}"; |
| 12 | + version = "0.5.4"; |
13 | 13 |
|
14 | 14 | src = fetchFromGitHub {
|
15 | 15 | owner = "mirleft";
|
16 | 16 | repo = "ocaml-nocrypto";
|
17 | 17 | rev = "v${version}";
|
18 |
| - sha256 = "0m3yvqpgfffqp15mcl08b78cv8zw25rnp6z1pkj5aimz6xg3gqbl"; |
| 18 | + sha256 = "0nhnlpbqh3mf9y2cxivlvfb70yfbdpvg6jslzq64xblpgjyg443p"; |
19 | 19 | };
|
20 | 20 |
|
21 |
| - buildInputs = [ ocaml ocaml_oasis findlib ounit ppx_sexp_conv ]; |
| 21 | + buildInputs = [ ocaml ocaml_oasis findlib ocamlbuild topkg opam cpuid ocb-stubblr |
| 22 | + ppx_sexp_conv ]; |
22 | 23 | propagatedBuildInputs = [ cstruct zarith sexplib ] ++ optional withLwt lwt;
|
23 | 24 |
|
24 |
| - configureFlags = [ "--enable-tests" ] ++ optional withLwt ["--enable-lwt"]; |
25 |
| - |
26 |
| - configurePhase = "./configure --prefix $out $configureFlags"; |
| 25 | + buildPhase = '' |
| 26 | + LD_LIBRARY_PATH=${cpuid}/lib/ocaml/${ocaml.version}/site-lib/stubslibs/ \ |
| 27 | + ${topkg.buildPhase} --with-lwt ${if withLwt then "true" else "false"} |
| 28 | + ''; |
| 29 | + inherit (topkg) installPhase; |
27 | 30 |
|
28 |
| - doCheck = true; |
29 |
| - checkTarget = "test"; |
30 | 31 | createFindlibDestdir = true;
|
31 | 32 |
|
32 | 33 | meta = {
|
|
0 commit comments