2022-08-23 08:04:50 +02:00
|
|
|
{ lib, buildDunePackage, ocaml, fetchurl
|
2021-03-16 01:28:51 +01:00
|
|
|
, ctypes, result
|
|
|
|
, alcotest
|
|
|
|
, file
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildDunePackage rec {
|
|
|
|
pname = "luv";
|
2024-01-17 14:42:30 +01:00
|
|
|
version = "0.5.12";
|
|
|
|
|
|
|
|
minimalOCamlVersion = "4.03";
|
2021-03-16 01:28:51 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/aantron/luv/releases/download/${version}/luv-${version}.tar.gz";
|
2024-01-17 14:42:30 +01:00
|
|
|
sha256 = "sha256-dp9qCIYqSdROIAQ+Jw73F3vMe7hnkDe8BgZWImNMVsA=";
|
2021-03-16 01:28:51 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
postConfigure = ''
|
|
|
|
for f in src/c/vendor/configure/{ltmain.sh,configure}; do
|
|
|
|
substituteInPlace "$f" --replace /usr/bin/file file
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ file ];
|
|
|
|
propagatedBuildInputs = [ ctypes result ];
|
2022-03-01 16:42:22 +01:00
|
|
|
checkInputs = [ alcotest ];
|
2024-01-17 14:42:30 +01:00
|
|
|
# Alcotest depends on fmt that needs 4.08 or newer
|
2022-08-23 08:04:50 +02:00
|
|
|
doCheck = lib.versionAtLeast ocaml.version "4.08";
|
2021-03-16 01:28:51 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/aantron/luv";
|
|
|
|
description = "Binding to libuv: cross-platform asynchronous I/O";
|
|
|
|
# MIT-licensed, extra licenses apply partially to libuv vendor
|
|
|
|
license = with licenses; [ mit bsd2 bsd3 cc-by-sa-40 ];
|
|
|
|
maintainers = with maintainers; [ locallycompact sternenseemann ];
|
|
|
|
};
|
|
|
|
}
|