From e166dacffbe1b9de1dcf601b2ef488d528f5da63 Mon Sep 17 00:00:00 2001 From: Daniel Firth Date: Sun, 14 Mar 2021 17:40:35 +0000 Subject: [PATCH 1/2] maintainers: add locallycompact --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index a9bf9e61f97b..3d2f6ad3ea66 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -5524,6 +5524,12 @@ githubId = 7622248; name = "Sebastian Zivota"; }; + locallycompact = { + email = "dan.firth@homotopic.tech"; + github = "locallycompact"; + githubId = 1267527; + name = "Daniel Firth"; + }; lopsided98 = { email = "benwolsieffer@gmail.com"; github = "lopsided98"; From 176ab26ccef83b742ae2c6beffe573968f4f20c0 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Tue, 16 Mar 2021 01:28:51 +0100 Subject: [PATCH 2/2] ocamlPackages.luv: init at 0.5.7 Enabling tests is not feasible as the test suite takes > 45min (haven't even run it to completion yet) which is not a good idea in ocamlPackages where you often have to build from source. Additionally it would require fetching the git repository since the test suite is not contained in the release tarball. Co-authored-by: locallycompact --- .../development/ocaml-modules/luv/default.nix | 35 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 4 +++ 2 files changed, 39 insertions(+) create mode 100644 pkgs/development/ocaml-modules/luv/default.nix diff --git a/pkgs/development/ocaml-modules/luv/default.nix b/pkgs/development/ocaml-modules/luv/default.nix new file mode 100644 index 000000000000..6ad5ce5d4879 --- /dev/null +++ b/pkgs/development/ocaml-modules/luv/default.nix @@ -0,0 +1,35 @@ +{ lib, buildDunePackage, fetchurl +, ctypes, result +, alcotest +, file +}: + +buildDunePackage rec { + pname = "luv"; + version = "0.5.7"; + useDune2 = true; + + src = fetchurl { + url = "https://github.com/aantron/luv/releases/download/${version}/luv-${version}.tar.gz"; + sha256 = "0wjnw5riydnzsk1xdzljlpzdnjwpa0j597y6x6ma4990mqj54260"; + }; + + 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 ]; + checkInputs = [ alcotest ]; + doCheck = true; + + 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 ]; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 3c8c500d8b5d..2a95409bca77 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -572,6 +572,10 @@ let lua-ml = callPackage ../development/ocaml-modules/lua-ml { }; + luv = callPackage ../development/ocaml-modules/luv { + inherit (pkgs) file; + }; + lwt = callPackage ../development/ocaml-modules/lwt { ocaml-migrate-parsetree = ocaml-migrate-parsetree-2-1; };