summaryrefslogtreecommitdiffstats
path: root/pkgs/development/ocaml-modules/ssl/default.nix
blob: 163daa0e66facfc0b590acbce5686b0e35f8db45 (plain)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{
  alcotest,
  buildDunePackage,
  dune-configurator,
  fetchFromGitHub,
  lib,
  ocaml,
  openssl,
  pkg-config,
}:

buildDunePackage rec {
  pname = "ssl";
  version = "0.7.0";

  duneVersion = "3";

  src = fetchFromGitHub {
    owner = "savonet";
    repo = "ocaml-ssl";
    rev = "v${version}";
    hash = "sha256-gi80iwlKaI4TdAVnCyPG03qRWFa19DHdTrA0KMFBAc4=";
  };

  nativeBuildInputs = [ pkg-config ];
  buildInputs = [ dune-configurator ];
  propagatedBuildInputs = [ openssl ];

  __darwinAllowLocalNetworking = true;
  doCheck = lib.versionAtLeast ocaml.version "4.08";
  checkInputs = [ alcotest ];
  preCheck = ''
    mkdir -p _build/default/tests/
    cp tests/digicert_certificate.pem _build/default/tests/
  '';

  meta = {
    homepage = "http://savonet.rastageeks.org/";
    description = "OCaml bindings for libssl";
    license = with lib.licenses; [
      lgpl21Plus
      ocamlLgplLinkingException
    ];
    maintainers = with lib.maintainers; [
      dandellion
    ];
  };
}