ocamlPackages.ounit2: init at 2.2.2

This commit is contained in:
sternenseemann 2020-04-13 16:42:14 +02:00 committed by Vincent Laporte
parent b1325ec4bc
commit 29a98f2be1
No known key found for this signature in database
GPG Key ID: EBD582ADDDB1F81F
3 changed files with 31 additions and 29 deletions

View File

@ -1,38 +1,16 @@
{ stdenv, fetchurl, fetchpatch, ocaml, findlib, ocamlbuild }: { stdenv, ocaml, findlib, ounit2 }:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "ounit-2.0.0"; pname = "ocaml${ocaml.version}-ounit";
inherit (ounit2) version src meta;
src = fetchurl {
url = "https://forge.ocamlcore.org/frs/download.php/1258/ounit-2.0.0.tar.gz";
sha256 = "118xsadrx84pif9vaq13hv4yh22w9kmr0ypvhrs0viir1jr0ajjd";
};
patches = with stdenv.lib;
optional (versionAtLeast ocaml.version "4.02") (fetchpatch {
url = "https://raw.githubusercontent.com/ocaml/opam-repository/master/packages/ounit/ounit.2.0.0/files/safe-string.patch";
sha256 = "0hbd2sqdz75lv5ax82yhsfdk1dlcvq12xpys6n85ysmrl0c3d3lk";
});
nativeBuildInputs = [ ocaml findlib ocamlbuild ];
buildInputs = [ findlib ]; buildInputs = [ findlib ];
configurePlatforms = []; propagatedBuildInputs = [ ounit2 ];
dontAddPrefix = true; phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
doCheck = true;
checkTarget = "test";
createFindlibDestdir = true; createFindlibDestdir = true;
meta = { installTargets = "install-ounit version='${ounit2.version}'";
homepage = "http://ounit.forge.ocamlcore.org/";
description = "Unit test framework for OCaml";
license = stdenv.lib.licenses.mit;
platforms = ocaml.meta.platforms or [];
maintainers = [
stdenv.lib.maintainers.maggesi
];
};
} }

View File

@ -0,0 +1,22 @@
{ lib, buildDunePackage, fetchurl, stdlib-shims }:
buildDunePackage rec {
minimumOCamlVersion = "4.02.3";
pname = "ounit2";
version = "2.2.2";
src = fetchurl {
url = "https://github.com/gildor478/ounit/releases/download/v${version}/ounit-v${version}.tbz";
sha256 = "1h4xdcyzwyhxg263w9b16x9n6cb11fzazmwnsnpich4djpl9lhsk";
};
propagatedBuildInputs = [ stdlib-shims ];
meta = with lib; {
homepage = "https://github.com/gildor478/ounit";
description = "A unit test framework for OCaml";
license = licenses.mit;
maintainers = with maintainers; [ sternenseemann ];
};
}

View File

@ -719,6 +719,8 @@ let
ounit = callPackage ../development/ocaml-modules/ounit { }; ounit = callPackage ../development/ocaml-modules/ounit { };
ounit2 = callPackage ../development/ocaml-modules/ounit2 { };
pgsolver = callPackage ../development/ocaml-modules/pgsolver { }; pgsolver = callPackage ../development/ocaml-modules/pgsolver { };
phylogenetics = callPackage ../development/ocaml-modules/phylogenetics { }; phylogenetics = callPackage ../development/ocaml-modules/phylogenetics { };