summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/sodium/default.nix
blob: 8c8895d45207f5c2af91f24151067e0fc8e7d286 (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
{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, ctypes, libsodium }:

stdenv.mkDerivation rec {
  pname = "ocaml${ocaml.version}-sodium";
  version = "0.6.0";

  src = fetchFromGitHub {
    owner  = "dsheets";
    repo   = "ocaml-sodium";
    rev    = version;
    sha256 = "124gpi1jhac46x05gp5viykyrafnlp03v1cmkl13c6pgcs8w04pv";
  };

  buildInputs = [ ocaml findlib ocamlbuild ];
  propagatedBuildInputs = [ ctypes libsodium ];

  createFindlibDestdir = true;

  hardeningDisable = stdenv.lib.optional stdenv.isDarwin "strictoverflow";

  meta = with stdenv.lib; {
    homepage = https://github.com/dsheets/ocaml-sodium;
    description = "Binding to libsodium 1.0.9+";
    platforms = ocaml.meta.platforms or [];
    maintainers = [ maintainers.rixed ];
  };
}