3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/ocaml-modules/sodium/default.nix
Ulrik Strid a13cdfe520 ocamlPackages tree-wide: Move buildInputs that should be nativeBuildInputs
To keep this for the future we also strictDeps where possible, including for janePackages, topkg, oasis and ocamlbuild.
This makes some closures significantly smaller and makes cross compilation easier
2022-02-24 14:39:27 +01:00

35 lines
907 B
Nix

{ lib, 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";
};
patches = [
# ctypes.stubs no longer pulls in bigarray automatically
./lib-gen-link-bigarray.patch
];
nativeBuildInputs = [ ocaml findlib ocamlbuild ];
propagatedBuildInputs = [ ctypes libsodium ];
strictDeps = true;
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 ];
};
}