diff --git a/pkgs/development/ocaml-modules/posix/base.nix b/pkgs/development/ocaml-modules/posix/base.nix index 6d0cd879d4e2..2b36a96f08f8 100644 --- a/pkgs/development/ocaml-modules/posix/base.nix +++ b/pkgs/development/ocaml-modules/posix/base.nix @@ -6,19 +6,17 @@ integers, }: -buildDunePackage rec { +buildDunePackage (finalAttrs: { pname = "posix-base"; - version = "2.2.0"; + version = "4.0.2"; src = fetchFromGitHub { owner = "savonet"; repo = "ocaml-posix"; - tag = "v${version}"; - hash = "sha256-JKJIiuo4lW8DmcK1mJlT22784J1NS2ig860jDbRIjIo="; + tag = "v${finalAttrs.version}"; + hash = "sha256-nBSIuz4WEnESlECdKujEcSxFOcSBFxW1zo7J/lT/lCY="; }; - minimalOCamlVersion = "4.08"; - propagatedBuildInputs = [ ctypes integers @@ -30,4 +28,4 @@ buildDunePackage rec { license = lib.licenses.mit; maintainers = [ lib.maintainers.vbgl ]; }; -} +}) diff --git a/pkgs/development/ocaml-modules/posix/errno.nix b/pkgs/development/ocaml-modules/posix/errno.nix new file mode 100644 index 000000000000..c91a0e02f17c --- /dev/null +++ b/pkgs/development/ocaml-modules/posix/errno.nix @@ -0,0 +1,20 @@ +{ + buildDunePackage, + posix-base, +}: + +buildDunePackage { + pname = "posix-errno"; + + inherit (posix-base) version src; + + propagatedBuildInputs = [ + posix-base + ]; + + doCheck = true; + + meta = posix-base.meta // { + description = "Posix-errno provides comprehensive errno handling"; + }; +} diff --git a/pkgs/development/ocaml-modules/posix/math2.nix b/pkgs/development/ocaml-modules/posix/math2.nix index e60116f0dedd..62168e5710a1 100644 --- a/pkgs/development/ocaml-modules/posix/math2.nix +++ b/pkgs/development/ocaml-modules/posix/math2.nix @@ -1,7 +1,6 @@ { buildDunePackage, posix-base, - unix-errno, }: buildDunePackage { @@ -10,7 +9,6 @@ buildDunePackage { propagatedBuildInputs = [ posix-base - unix-errno ]; meta = posix-base.meta // { diff --git a/pkgs/development/ocaml-modules/posix/socket.nix b/pkgs/development/ocaml-modules/posix/socket.nix index 47d422b09322..f7b5fb473b02 100644 --- a/pkgs/development/ocaml-modules/posix/socket.nix +++ b/pkgs/development/ocaml-modules/posix/socket.nix @@ -1,4 +1,8 @@ -{ buildDunePackage, posix-base }: +{ + buildDunePackage, + posix-base, + dune-configurator, +}: buildDunePackage { pname = "posix-socket"; @@ -7,6 +11,8 @@ buildDunePackage { minimalOCamlVersion = "4.12"; + buildInputs = [ dune-configurator ]; + propagatedBuildInputs = [ posix-base ]; doCheck = true; diff --git a/pkgs/development/ocaml-modules/posix/time2.nix b/pkgs/development/ocaml-modules/posix/time2.nix index 42906f67381a..ca38ba107945 100644 --- a/pkgs/development/ocaml-modules/posix/time2.nix +++ b/pkgs/development/ocaml-modules/posix/time2.nix @@ -3,7 +3,7 @@ buildDunePackage, posix-base, posix-types, - unix-errno, + posix-errno, }: buildDunePackage { @@ -14,7 +14,7 @@ buildDunePackage { propagatedBuildInputs = [ posix-base posix-types - unix-errno + posix-errno ]; doCheck = true; diff --git a/pkgs/development/ocaml-modules/srt/default.nix b/pkgs/development/ocaml-modules/srt/default.nix index 6cbcf20b1727..7275d6c6d11e 100644 --- a/pkgs/development/ocaml-modules/srt/default.nix +++ b/pkgs/development/ocaml-modules/srt/default.nix @@ -8,17 +8,17 @@ ctypes-foreign, }: -buildDunePackage rec { +buildDunePackage (finalAttrs: { pname = "srt"; - version = "0.3.3"; + version = "0.3.4"; minimalOCamlVersion = "4.12"; src = fetchFromGitHub { owner = "savonet"; repo = "ocaml-srt"; - rev = "v${version}"; - hash = "sha256-FVgOEBPYZz7SQ5c6mLAssDwY1NuXsV3ghP7OyLRd9Kw="; + tag = "v${finalAttrs.version}"; + hash = "sha256-+1/TffqssRA9YR3KLfbAr/ZpDF5XUKw24gj4HWrhObU="; }; buildInputs = [ dune-configurator ]; @@ -31,10 +31,10 @@ buildDunePackage rec { meta = { description = "OCaml bindings for the libsrt library"; license = lib.licenses.gpl2Plus; - inherit (src.meta) homepage; + homepage = "https://github.com/savonet/ocaml-srt"; maintainers = with lib.maintainers; [ vbgl dandellion ]; }; -} +}) diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index cc7036327e32..385f9012a673 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1746,6 +1746,8 @@ let posix-base = callPackage ../development/ocaml-modules/posix/base.nix { }; + posix-errno = callPackage ../development/ocaml-modules/posix/errno.nix { }; + posix-math2 = callPackage ../development/ocaml-modules/posix/math2.nix { }; posix-socket = callPackage ../development/ocaml-modules/posix/socket.nix { };