567e8dfd8e
This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
52 lines
994 B
Nix
52 lines
994 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.hostPlatform.isDarwin "strictoverflow";
|
|
|
|
meta = {
|
|
homepage = "https://github.com/dsheets/ocaml-sodium";
|
|
description = "Binding to libsodium 1.0.9+";
|
|
inherit (ocaml.meta) platforms;
|
|
maintainers = [ lib.maintainers.rixed ];
|
|
broken = lib.versionAtLeast ocaml.version "5.0";
|
|
};
|
|
}
|