ocamlPackages.inotify: 2.3 → 2.4.1

This commit is contained in:
Vincent Laporte 2022-12-29 06:18:40 +01:00 committed by Vincent Laporte
parent 673cd10e59
commit c26f00141b

View file

@ -1,42 +1,26 @@
{ stdenv, lib, fetchFromGitHub, fetchpatch, ocaml, findlib, ocamlbuild
, ocaml_lwt # optional lwt support
, ounit, fileutils # only for tests
{ lib, fetchFromGitHub, buildDunePackage
, lwt # optional lwt support
, ounit2, fileutils # only for tests
}:
stdenv.mkDerivation rec {
version = "2.3";
pname = "ocaml${ocaml.version}-inotify";
buildDunePackage rec {
version = "2.4.1";
pname = "inotify";
src = fetchFromGitHub {
owner = "whitequark";
repo = "ocaml-inotify";
rev = "v${version}";
sha256 = "1s6vmqpx19hxzsi30jvp3h7p56rqnxfhfddpcls4nz8sqca1cz5y";
hash = "sha256-2ATFF3HeATjhWgW4dG4jheQ9m1oE8xTQ7mpMT/1Jdp8=";
};
patches = [ (fetchpatch {
url = "https://github.com/whitequark/ocaml-inotify/commit/716c8002cc1652f58eb0c400ae92e04003cba8c9.patch";
sha256 = "04lfxrrsmk2mc704kaln8jqx93jc4bkxhijmfy2d4cmk1cim7r6k";
}) ];
nativeBuildInputs = [ ocaml findlib ocamlbuild ];
buildInputs = [ ocaml_lwt ];
checkInputs = [ ounit fileutils ];
buildInputs = [ lwt ];
checkInputs = [ ounit2 fileutils ];
# Otherwise checkInputs can't be found
strictDeps = false;
configureFlags = [ "--enable-lwt"
(lib.optionalString doCheck "--enable-tests") ];
postConfigure = lib.optionalString doCheck ''
echo '<lib_test/test_inotify_lwt.*>: pkg_threads' | tee -a _tags
'';
doCheck = true;
checkTarget = "test";
createFindlibDestdir = true;
meta = {
description = "Bindings for Linuxs filesystem monitoring interface, inotify";