diff --git a/pkgs/development/ocaml-modules/extunix/default.nix b/pkgs/development/ocaml-modules/extunix/default.nix new file mode 100644 index 000000000000..da2bc782a2a1 --- /dev/null +++ b/pkgs/development/ocaml-modules/extunix/default.nix @@ -0,0 +1,42 @@ +{ + lib, + buildDunePackage, + fetchFromGitHub, + dune-configurator, + ppxlib, +}: + +buildDunePackage (finalAttrs: { + pname = "extunix"; + version = "0.4.4"; + + src = fetchFromGitHub { + owner = "ygrek"; + repo = "extunix"; + tag = "v${finalAttrs.version}"; + hash = "sha256-7wJDGv19etkDHRwwQ+WONtJswxNMjr2Q2Vhis4WgFek="; + }; + + postPatch = '' + substituteInPlace src/dune --replace-fail 'libraries unix bigarray bytes' 'libraries unix bigarray' + ''; + + buildInputs = [ + dune-configurator + ]; + + propagatedBuildInputs = [ + ppxlib + ]; + + # need absolute paths outside from sandbox + doCheck = false; + + meta = { + description = "Collection of thin bindings to various low-level system API"; + homepage = "https://github.com/ygrek/extunix"; + changelog = "https://github.com/ygrek/extunix/releases/tag/v${finalAttrs.version}"; + license = lib.licenses.lgpl21Only; + maintainers = with lib.maintainers; [ redianthus ]; + }; +}) diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index f109780364a2..c562d1c57f01 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -574,6 +574,8 @@ let extlib-1-7-7 = callPackage ../development/ocaml-modules/extlib/1.7.7.nix { }; + extunix = callPackage ../development/ocaml-modules/extunix/default.nix { }; + ezjsonm = callPackage ../development/ocaml-modules/ezjsonm { }; ezjsonm-encoding = callPackage ../development/ocaml-modules/ezjsonm-encoding { };