Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: b1325ec4bc08
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 29a98f2be196
Choose a head ref
  • 1 commit
  • 3 files changed
  • 1 contributor

Commits on Apr 15, 2020

  1. ocamlPackages.ounit2: init at 2.2.2

    sternenseemann authored and vbgl committed Apr 15, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    yorickvP Yorick
    Copy the full SHA
    29a98f2 View commit details
Showing with 31 additions and 29 deletions.
  1. +7 −29 pkgs/development/ocaml-modules/ounit/default.nix
  2. +22 −0 pkgs/development/ocaml-modules/ounit2/default.nix
  3. +2 −0 pkgs/top-level/ocaml-packages.nix
36 changes: 7 additions & 29 deletions pkgs/development/ocaml-modules/ounit/default.nix
Original file line number Diff line number Diff line change
@@ -1,38 +1,16 @@
{ stdenv, fetchurl, fetchpatch, ocaml, findlib, ocamlbuild }:
{ stdenv, ocaml, findlib, ounit2 }:

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 ];
configurePlatforms = [];

dontAddPrefix = true;
propagatedBuildInputs = [ ounit2 ];

doCheck = true;

checkTarget = "test";
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];

createFindlibDestdir = true;

meta = {
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
];
};
installTargets = "install-ounit version='${ounit2.version}'";

}
22 changes: 22 additions & 0 deletions pkgs/development/ocaml-modules/ounit2/default.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/ocaml-packages.nix
Original file line number Diff line number Diff line change
@@ -719,6 +719,8 @@ let

ounit = callPackage ../development/ocaml-modules/ounit { };

ounit2 = callPackage ../development/ocaml-modules/ounit2 { };

pgsolver = callPackage ../development/ocaml-modules/pgsolver { };

phylogenetics = callPackage ../development/ocaml-modules/phylogenetics { };