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

38 lines
1.1 KiB
Nix
Raw Normal View History

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