forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git] / pkgs / development / ocaml-modules / sodium / default.nix
bloba3777f7d8aec843ef7657e34f04f48fc5173954a
1 { lib, stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, ctypes, libsodium }:
3 lib.throwIf (lib.versionAtLeast ocaml.version "5.0")
4   "sodium is not available for OCaml ${ocaml.version}"
6 stdenv.mkDerivation rec {
7   pname = "ocaml${ocaml.version}-sodium";
8   version = "0.6.0";
10   src = fetchFromGitHub {
11     owner  = "dsheets";
12     repo   = "ocaml-sodium";
13     rev    = version;
14     sha256 = "124gpi1jhac46x05gp5viykyrafnlp03v1cmkl13c6pgcs8w04pv";
15   };
17   patches = [
18     # ctypes.stubs no longer pulls in bigarray automatically
19     ./lib-gen-link-bigarray.patch
20   ];
22   nativeBuildInputs = [ ocaml findlib ocamlbuild ];
23   propagatedBuildInputs = [ ctypes libsodium ];
25   strictDeps = true;
27   createFindlibDestdir = true;
29   hardeningDisable = lib.optional stdenv.hostPlatform.isDarwin "strictoverflow";
31   meta = with lib; {
32     homepage = "https://github.com/dsheets/ocaml-sodium";
33     description = "Binding to libsodium 1.0.9+";
34     inherit (ocaml.meta) platforms;
35     maintainers = [ maintainers.rixed ];
36   };