|
1 |
| -{ stdenv, buildOcaml, fetchFromGitHub, ocaml, findlib, asn1-combinators, nocrypto |
2 |
| -, ounit, ocaml_oasis, ppx_sexp_conv, cstruct-unix |
| 1 | +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg |
| 2 | +, asn1-combinators, astring, nocrypto, ppx_sexp_conv |
| 3 | +, ounit, cstruct-unix |
3 | 4 | }:
|
4 | 5 |
|
5 |
| -buildOcaml rec { |
6 |
| - name = "x509"; |
7 |
| - version = "0.5.3"; |
| 6 | +stdenv.mkDerivation rec { |
| 7 | + name = "ocaml${ocaml.version}-x509-${version}"; |
| 8 | + version = "0.6.1"; |
8 | 9 |
|
9 |
| - mininimumSupportedOcamlVersion = "4.02"; |
10 |
| - |
11 |
| - src = fetchFromGitHub { |
12 |
| - owner = "mirleft"; |
13 |
| - repo = "ocaml-x509"; |
14 |
| - rev = "${version}"; |
15 |
| - sha256 = "07cc3z6h87460z3f4vz8nlczw5jkc4vjhix413z9x6nral876rn7"; |
| 10 | + src = fetchurl { |
| 11 | + url = "https://github.com/mirleft/ocaml-x509/releases/download/${version}/x509-${version}.tbz"; |
| 12 | + sha256 = "1c62mw9rnzq0rs3ihbhfs18nv4mdzwag7893hlqgji3wmaai70pk"; |
16 | 13 | };
|
17 | 14 |
|
18 |
| - buildInputs = [ ocaml ocaml_oasis findlib ounit ppx_sexp_conv cstruct-unix ]; |
19 |
| - propagatedBuildInputs = [ asn1-combinators nocrypto ]; |
| 15 | + unpackCmd = "tar -xjf $curSrc"; |
| 16 | + |
| 17 | + buildInputs = [ ocaml findlib ocamlbuild topkg ppx_sexp_conv ounit cstruct-unix ]; |
| 18 | + propagatedBuildInputs = [ asn1-combinators astring nocrypto ]; |
20 | 19 |
|
21 |
| - configureFlags = "--enable-tests"; |
22 |
| - configurePhase = "./configure --prefix $out $configureFlags"; |
| 20 | + buildPhase = "${topkg.run} build --tests true"; |
23 | 21 |
|
24 | 22 | doCheck = true;
|
25 |
| - checkTarget = "test"; |
26 |
| - createFindlibDestdir = true; |
| 23 | + checkPhase = "${topkg.run} test"; |
| 24 | + |
| 25 | + inherit (topkg) installPhase; |
27 | 26 |
|
28 | 27 | meta = with stdenv.lib; {
|
29 | 28 | homepage = https://github.com/mirleft/ocaml-x509;
|
|
0 commit comments