Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildDunePackage, 4 ocaml, 5 fetchurl, 6 ctypes, 7 result, 8 alcotest, 9 file, 10}: 11 12buildDunePackage rec { 13 pname = "luv"; 14 version = "0.5.12"; 15 16 minimalOCamlVersion = "4.03"; 17 18 src = fetchurl { 19 url = "https://github.com/aantron/luv/releases/download/${version}/luv-${version}.tar.gz"; 20 sha256 = "sha256-dp9qCIYqSdROIAQ+Jw73F3vMe7hnkDe8BgZWImNMVsA="; 21 }; 22 23 patches = [ 24 # backport of patch to fix incompatible pointer type. remove next update 25 # https://github.com/aantron/luv/commit/ad7f953fccb8732fe4eb9018556e8d4f82abf8f2 26 ./incompatible-pointer-type-fix.diff 27 ]; 28 29 postConfigure = '' 30 for f in src/c/vendor/configure/{ltmain.sh,configure}; do 31 substituteInPlace "$f" --replace /usr/bin/file file 32 done 33 ''; 34 35 nativeBuildInputs = [ file ]; 36 propagatedBuildInputs = [ 37 ctypes 38 result 39 ]; 40 checkInputs = [ alcotest ]; 41 # Alcotest depends on fmt that needs 4.08 or newer 42 doCheck = lib.versionAtLeast ocaml.version "4.08"; 43 44 meta = with lib; { 45 homepage = "https://github.com/aantron/luv"; 46 description = "Binding to libuv: cross-platform asynchronous I/O"; 47 # MIT-licensed, extra licenses apply partially to libuv vendor 48 license = with licenses; [ 49 mit 50 bsd2 51 bsd3 52 cc-by-sa-40 53 ]; 54 maintainers = with maintainers; [ 55 locallycompact 56 sternenseemann 57 ]; 58 }; 59}