nixpkgs/pkgs/development/ocaml-modules/nocrypto/default.nix

40 lines
1.1 KiB
Nix
Raw Normal View History

2017-03-22 22:53:28 +00:00
{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, opam, topkg
, cpuid, ocb-stubblr
, cstruct, zarith, ocaml_oasis, ppx_sexp_conv, sexplib
, lwt ? null
}:
2016-11-03 00:09:54 +00:00
with stdenv.lib;
let withLwt = lwt != null; in
2017-03-22 22:53:28 +00:00
stdenv.mkDerivation rec {
name = "ocaml${ocaml.version}-nocrypto-${version}";
version = "0.5.4";
2016-11-03 00:09:54 +00:00
src = fetchFromGitHub {
owner = "mirleft";
repo = "ocaml-nocrypto";
rev = "v${version}";
2017-03-22 22:53:28 +00:00
sha256 = "0nhnlpbqh3mf9y2cxivlvfb70yfbdpvg6jslzq64xblpgjyg443p";
};
2017-03-22 22:53:28 +00:00
buildInputs = [ ocaml ocaml_oasis findlib ocamlbuild topkg opam cpuid ocb-stubblr
ppx_sexp_conv ];
2016-11-03 00:09:54 +00:00
propagatedBuildInputs = [ cstruct zarith sexplib ] ++ optional withLwt lwt;
2017-03-22 22:53:28 +00:00
buildPhase = ''
LD_LIBRARY_PATH=${cpuid}/lib/ocaml/${ocaml.version}/site-lib/stubslibs/ \
2017-04-11 16:08:51 +00:00
${topkg.buildPhase} --with-lwt ${boolToString withLwt}
2017-03-22 22:53:28 +00:00
'';
inherit (topkg) installPhase;
createFindlibDestdir = true;
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 ];
};
}