summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/nocrypto/default.nix
blob: a5d73839cb2e9518c6d14d78637fde589df1918d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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 ];
  };
}