diff options
author | sternenseemann <git@lukasepple.de> | 2016-11-03 01:09:54 +0100 |
---|---|---|
committer | sternenseemann <git@lukasepple.de> | 2016-11-03 14:24:47 +0100 |
commit | d8686b4949b4d67844f8f9047167fc85bfbeca08 (patch) | |
tree | 69a1b6d422ce16ce635b65228bb477f871e2b910 /pkgs/development/ocaml-modules/nocrypto | |
parent | 32e86a3e2a474f937a68c8d7d06d125ef24574c6 (diff) | |
download | nixlib-d8686b4949b4d67844f8f9047167fc85bfbeca08.tar nixlib-d8686b4949b4d67844f8f9047167fc85bfbeca08.tar.gz nixlib-d8686b4949b4d67844f8f9047167fc85bfbeca08.tar.bz2 nixlib-d8686b4949b4d67844f8f9047167fc85bfbeca08.tar.lz nixlib-d8686b4949b4d67844f8f9047167fc85bfbeca08.tar.xz nixlib-d8686b4949b4d67844f8f9047167fc85bfbeca08.tar.zst nixlib-d8686b4949b4d67844f8f9047167fc85bfbeca08.zip |
ocaml-nocrypto: 0.5.1 -> 0.5.3
Diffstat (limited to 'pkgs/development/ocaml-modules/nocrypto')
-rw-r--r-- | pkgs/development/ocaml-modules/nocrypto/default.nix | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/pkgs/development/ocaml-modules/nocrypto/default.nix b/pkgs/development/ocaml-modules/nocrypto/default.nix index f8db935b6122..b56d04b062c0 100644 --- a/pkgs/development/ocaml-modules/nocrypto/default.nix +++ b/pkgs/development/ocaml-modules/nocrypto/default.nix @@ -1,20 +1,30 @@ -{ stdenv, fetchzip, ocaml, findlib, cstruct, type_conv, zarith, ounit }: +{ stdenv, buildOcaml, fetchFromGitHub, ocaml, findlib, cstruct, type_conv, zarith, ounit, ocaml_oasis, ppx_sexp_conv +, lwt ? null +, withLwt ? true}: -assert stdenv.lib.versionAtLeast ocaml.version "4.01"; +with stdenv.lib; +assert withLwt -> lwt != null; -stdenv.mkDerivation rec { - name = "ocaml-nocrypto-${version}"; - version = "0.5.1"; +buildOcaml rec { + name = "nocrypto"; + version = "0.5.3"; - src = fetchzip { - url = "https://github.com/mirleft/ocaml-nocrypto/archive/${version}.tar.gz"; - sha256 = "15gffvixk12ghsfra9amfszd473c8h188zfj03ngvblbdm0d80m0"; + minimumSupportedOcamlVersion = "4.02"; + + src = fetchFromGitHub { + owner = "mirleft"; + repo = "ocaml-nocrypto"; + rev = "v${version}"; + sha256 = "0m3yvqpgfffqp15mcl08b78cv8zw25rnp6z1pkj5aimz6xg3gqbl"; }; - buildInputs = [ ocaml findlib type_conv ounit ]; - propagatedBuildInputs = [ cstruct zarith ]; + 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"; - configureFlags = "--enable-tests"; doCheck = true; checkTarget = "test"; createFindlibDestdir = true; @@ -22,7 +32,6 @@ stdenv.mkDerivation 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 ]; }; |