diff options
Diffstat (limited to 'pkgs/development/ocaml-modules/nocrypto')
-rw-r--r-- | pkgs/development/ocaml-modules/nocrypto/default.nix | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/pkgs/development/ocaml-modules/nocrypto/default.nix b/pkgs/development/ocaml-modules/nocrypto/default.nix index b56d04b062c0..f8db935b6122 100644 --- a/pkgs/development/ocaml-modules/nocrypto/default.nix +++ b/pkgs/development/ocaml-modules/nocrypto/default.nix @@ -1,30 +1,20 @@ -{ stdenv, buildOcaml, fetchFromGitHub, ocaml, findlib, cstruct, type_conv, zarith, ounit, ocaml_oasis, ppx_sexp_conv -, lwt ? null -, withLwt ? true}: +{ stdenv, fetchzip, ocaml, findlib, cstruct, type_conv, zarith, ounit }: -with stdenv.lib; -assert withLwt -> lwt != null; +assert stdenv.lib.versionAtLeast ocaml.version "4.01"; -buildOcaml rec { - name = "nocrypto"; - version = "0.5.3"; +stdenv.mkDerivation rec { + name = "ocaml-nocrypto-${version}"; + version = "0.5.1"; - minimumSupportedOcamlVersion = "4.02"; - - src = fetchFromGitHub { - owner = "mirleft"; - repo = "ocaml-nocrypto"; - rev = "v${version}"; - sha256 = "0m3yvqpgfffqp15mcl08b78cv8zw25rnp6z1pkj5aimz6xg3gqbl"; + src = fetchzip { + url = "https://github.com/mirleft/ocaml-nocrypto/archive/${version}.tar.gz"; + sha256 = "15gffvixk12ghsfra9amfszd473c8h188zfj03ngvblbdm0d80m0"; }; - buildInputs = [ ocaml ocaml_oasis findlib type_conv ounit ppx_sexp_conv ]; - propagatedBuildInputs = [ cstruct zarith ] ++ optional withLwt lwt; - - configureFlags = [ "--enable-tests" ] ++ optional withLwt ["--enable-lwt"]; - - configurePhase = "./configure --prefix $out $configureFlags"; + buildInputs = [ ocaml findlib type_conv ounit ]; + propagatedBuildInputs = [ cstruct zarith ]; + configureFlags = "--enable-tests"; doCheck = true; checkTarget = "test"; createFindlibDestdir = true; @@ -32,6 +22,7 @@ buildOcaml rec { meta = { homepage = https://github.com/mirleft/ocaml-nocrypto; description = "Simplest possible crypto to support TLS"; + platforms = ocaml.meta.platforms or []; license = stdenv.lib.licenses.bsd2; maintainers = with stdenv.lib.maintainers; [ vbgl ]; }; |