From af21739688ece64aed7dd49381be55a2a015d74c Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Fri, 9 Oct 2015 21:23:06 +0200 Subject: [PATCH] ocaml-nocrypto: init at 0.5.1 Simplest possible crypto to support TLS Homepage: https://github.com/mirleft/ocaml-nocrypto --- .../ocaml-modules/nocrypto/default.nix | 33 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 pkgs/development/ocaml-modules/nocrypto/default.nix diff --git a/pkgs/development/ocaml-modules/nocrypto/default.nix b/pkgs/development/ocaml-modules/nocrypto/default.nix new file mode 100644 index 000000000000..a5d73839cb2e --- /dev/null +++ b/pkgs/development/ocaml-modules/nocrypto/default.nix @@ -0,0 +1,33 @@ +{ stdenv, fetchzip, ocaml, findlib, cstruct, type_conv, zarith, ounit }: + +let + version = "0.5.1"; + ocaml_version = stdenv.lib.getVersion ocaml; +in + +assert stdenv.lib.versionAtLeast ocaml_version "4.01"; + +stdenv.mkDerivation { + name = "ocaml-nocrypto-${version}"; + + src = fetchzip { + url = "https://github.com/mirleft/ocaml-nocrypto/archive/${version}.tar.gz"; + sha256 = "15gffvixk12ghsfra9amfszd473c8h188zfj03ngvblbdm0d80m0"; + }; + + buildInputs = [ ocaml findlib type_conv ounit ]; + propagatedBuildInputs = [ cstruct zarith ]; + + configureFlags = "--enable-tests"; + doCheck = true; + checkTarget = "test"; + createFindlibDestdir = true; + + meta = { + homepage = https://github.com/mirleft/ocaml-nocrypto; + description = "Simplest possible crypto to support TLS"; + platforms = ocaml.meta.platforms; + license = stdenv.lib.licenses.bsd2; + maintainers = with stdenv.lib.maintainers; [ vbgl ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f8af167b14c8..ae18eea69498 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4475,6 +4475,8 @@ let mlgmp = callPackage ../development/ocaml-modules/mlgmp { }; + nocrypto = callPackage ../development/ocaml-modules/nocrypto { }; + ocaml_batteries = callPackage ../development/ocaml-modules/batteries { }; comparelib = callPackage ../development/ocaml-modules/comparelib { };