nixpkgs/pkgs/development/ocaml-modules/sodium/default.nix
sternenseemann 4e42cac49d ocamlPackages: stdenv.lib → lib
This change was produced by searching for remaining occurrences of
stdenv.lib and replacing them manually.

Reference #108938.
2021-01-12 16:33:18 +01:00

32 lines
877 B
Nix

{ lib, stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, ctypes, libsodium }:
if lib.versionAtLeast ocaml.version "4.10"
then throw "sodium is not available for OCaml ${ocaml.version}"
else
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 = lib.optional stdenv.isDarwin "strictoverflow";
meta = with lib; {
homepage = "https://github.com/dsheets/ocaml-sodium";
description = "Binding to libsodium 1.0.9+";
platforms = ocaml.meta.platforms or [];
maintainers = [ maintainers.rixed ];
};
}