Skip to content

Commit

Permalink
ocamlPackages.inotify: fix tests for OCaml 4.02
Browse files Browse the repository at this point in the history
  • Loading branch information
vbgl committed Jul 5, 2020
1 parent 60940d7 commit 0270bea
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions pkgs/development/ocaml-modules/inotify/default.nix
@@ -1,6 +1,5 @@
{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild
{ stdenv, fetchFromGitHub, fetchpatch, ocaml, findlib, ocamlbuild
, ocaml_lwt # optional lwt support
, doCheck ? stdenv.lib.versionAtLeast ocaml.version "4.03"
, ounit, fileutils # only for tests
}:

Expand All @@ -15,13 +14,18 @@ stdenv.mkDerivation rec {
sha256 = "1s6vmqpx19hxzsi30jvp3h7p56rqnxfhfddpcls4nz8sqca1cz5y";
};

buildInputs = [ ocaml findlib ocamlbuild ocaml_lwt ]
++ stdenv.lib.optionals doCheck [ ounit fileutils ];
patches = [ (fetchpatch {
url = "https://github.com/whitequark/ocaml-inotify/commit/716c8002cc1652f58eb0c400ae92e04003cba8c9.patch";
sha256 = "04lfxrrsmk2mc704kaln8jqx93jc4bkxhijmfy2d4cmk1cim7r6k";
}) ];

buildInputs = [ ocaml findlib ocamlbuild ocaml_lwt ];
checkInputs = [ ounit fileutils ];

configureFlags = [ "--enable-lwt"
(stdenv.lib.optionalString doCheck "--enable-tests") ];

inherit doCheck;
doCheck = true;
checkTarget = "test";

createFindlibDestdir = true;
Expand Down

0 comments on commit 0270bea

Please sign in to comment.