Unverified Commit 1a29a7ae authored by superherointj's avatar superherointj Committed by GitHub
Browse files

Merge pull request #214801 from vbgl/ocaml-ounit2-needs-ncurses

ocamlPackages.ounit2: fix tests with OCaml < 4.07
parents 04795bed b126f231
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
{ lib, ocaml, buildDunePackage, fetchurl, seq, stdlib-shims, ncurses }:

buildDunePackage rec {
  minimumOCamlVersion = "4.04";
  minimalOCamlVersion = "4.04";

  pname = "ounit2";
  version = "2.2.6";

  useDune2 = lib.versionAtLeast ocaml.version "4.08";
  duneVersion = if lib.versionAtLeast ocaml.version "4.08" then "2" else "1";

  src = fetchurl {
    url = "https://github.com/gildor478/ounit/releases/download/v${version}/ounit-${version}.tbz";
    sha256 = "sha256-BpD7Hg6QoY7tXDVms8wYJdmLDox9UbtrhGyVxFphWRM=";
    hash = "sha256-BpD7Hg6QoY7tXDVms8wYJdmLDox9UbtrhGyVxFphWRM=";
  };

  propagatedBuildInputs = [ seq stdlib-shims ];

  doCheck = true;
  nativeCheckInputs = lib.optional (lib.versionOlder ocaml.version "4.07") ncurses;
  checkInputs = lib.optional (lib.versionOlder ocaml.version "4.07") ncurses;

  meta = with lib; {
    homepage = "https://github.com/gildor478/ounit";