1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-23 07:26:54 +00:00
nixpkgs/pkgs/development/ocaml-modules/nocrypto/default.nix
2018-06-06 07:14:27 +00:00

35 lines
1,006 B
Nix

{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, topkg
, cpuid, ocb-stubblr
, cstruct, zarith, ppx_sexp_conv, sexplib
, cstruct-lwt ? null
}:
with stdenv.lib;
let withLwt = cstruct-lwt != null; in
stdenv.mkDerivation rec {
name = "ocaml${ocaml.version}-nocrypto-${version}";
version = "0.5.4";
src = fetchFromGitHub {
owner = "mirleft";
repo = "ocaml-nocrypto";
rev = "v${version}";
sha256 = "0nhnlpbqh3mf9y2cxivlvfb70yfbdpvg6jslzq64xblpgjyg443p";
};
buildInputs = [ ocaml findlib ocamlbuild topkg cpuid ocb-stubblr
ppx_sexp_conv ];
propagatedBuildInputs = [ cstruct zarith sexplib ] ++ optional withLwt cstruct-lwt;
buildPhase = "${topkg.buildPhase} --with-lwt ${boolToString withLwt}";
inherit (topkg) installPhase;
meta = {
homepage = https://github.com/mirleft/ocaml-nocrypto;
description = "Simplest possible crypto to support TLS";
license = stdenv.lib.licenses.bsd2;
maintainers = with stdenv.lib.maintainers; [ vbgl ];
};
}