Unverified Commit 9f3c48ee authored by Nick Cao's avatar Nick Cao Committed by GitHub
Browse files

Merge pull request #235118 from NixOS/backport-234154-to-release-23.05

[Backport release-23.05] ocamlPackages.iter: 1.6 → 1.7
parents 8b26f67c 35a6f5fb
Loading
Loading
Loading
Loading
+7 −13
Original line number Diff line number Diff line
{ lib, fetchFromGitHub, buildDunePackage, ocaml, dune-configurator
, result, seq
{ lib, fetchurl, buildDunePackage
, mdx, ounit2, qcheck-core
}:

buildDunePackage rec {
  pname = "iter";
  version = "1.6";
  version = "1.7";

  duneVersion = "3";
  minimalOCamlVersion = "4.08";

  src = fetchFromGitHub {
    owner = "c-cube";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-FbM/Vk/h4wkrBjyf9/QXTvTOA0nNqsdHP1mDnVkg1is=";
  src = fetchurl {
    url = "https://github.com/c-cube/iter/releases/download/v${version}/iter-${version}.tbz";
    hash = "sha256-vtcSnPMxpBwDve1zsR6cEnUsyu3JELPt2Kwu4OEEtzA=";
  };

  buildInputs = [ dune-configurator ];
  propagatedBuildInputs = [ result seq ];

  doCheck = lib.versionAtLeast ocaml.version "4.08";
  doCheck = true;
  nativeCheckInputs = [ mdx.bin ];
  checkInputs = [ ounit2 qcheck-core ];

+2 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@ buildDunePackage rec {
  };

  postPatch = lib.optionalString (lib.versionAtLeast ocaml.version "5.0") ''
    substituteInPlace src/core/dune \
      --replace "(libraries bytes)" ""
    substituteInPlace src/unix/dune \
      --replace "libraries bigarray lwt" "libraries lwt"
  '';
+2 −1
Original line number Diff line number Diff line
@@ -13,7 +13,8 @@ buildDunePackage rec {

  postPatch = lib.optionalString (lib.versionAtLeast ocaml.version "5.0") ''
    substituteInPlace src/dune \
      --replace "libraries ocplib_endian bigarray" "libraries ocplib_endian"
      --replace "(libraries bytes)" "" \
      --replace "libraries ocplib_endian bigarray bytes" "libraries ocplib_endian"
  '';

  minimalOCamlVersion = "4.03";