Files
nixpkgs/pkgs/development/ocaml-modules/sodium/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
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>
2025-12-10 18:09:49 +01:00

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";
};
}