From 0270bea44100c304033eba2df26f92b942dbdb2e Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Sun, 28 Jun 2020 11:59:45 +0200 Subject: [PATCH] ocamlPackages.inotify: fix tests for OCaml 4.02 --- pkgs/development/ocaml-modules/inotify/default.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pkgs/development/ocaml-modules/inotify/default.nix b/pkgs/development/ocaml-modules/inotify/default.nix index e2993077521..e3599a2304a 100644 --- a/pkgs/development/ocaml-modules/inotify/default.nix +++ b/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 }: @@ -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;