From 9d33cb414a464e3f1141cfc439ebd2090f81a34e Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Sun, 17 May 2020 02:16:49 +0200 Subject: [PATCH] ocamlPackages.curly: init at 2019-11-14 --- .../ocaml-modules/curly/default.nix | 27 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 4 +++ 2 files changed, 31 insertions(+) create mode 100644 pkgs/development/ocaml-modules/curly/default.nix diff --git a/pkgs/development/ocaml-modules/curly/default.nix b/pkgs/development/ocaml-modules/curly/default.nix new file mode 100644 index 00000000000..1d455582b3b --- /dev/null +++ b/pkgs/development/ocaml-modules/curly/default.nix @@ -0,0 +1,27 @@ +{ lib, buildDunePackage, fetchFromGitHub, ocaml +, result, alcotest, cohttp-lwt-unix, odoc, curl }: + +buildDunePackage rec { + pname = "curly"; + version = "unstable-2019-11-14"; + + minimumOCamlVersion = "4.02"; + + src = fetchFromGitHub { + owner = "rgrinberg"; + repo = pname; + rev = "33a538c89ef8279d4591454a7f699a4183dde5d0"; + sha256 = "10pxbvf5xrsajaxrccxh2lqhgp3yaf61z9w03rvb2mq44nc2dggz"; + }; + + propagatedBuildInputs = [ result ]; + checkInputs = [ alcotest cohttp-lwt-unix ]; + # test dependencies are only available for >= 4.05 + doCheck = lib.versionAtLeast ocaml.version "4.05"; + + postPatch = '' + substituteInPlace src/curly.ml \ + --replace "exe=\"curl\"" "exe=\"${curl}/bin/curl\"" + ''; +} + diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 74baab7d0d5..010e46bf549 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -187,6 +187,10 @@ let csv-lwt = callPackage ../development/ocaml-modules/csv/lwt.nix { }; + curly = callPackage ../development/ocaml-modules/curly { + inherit (pkgs) curl; + }; + curses = callPackage ../development/ocaml-modules/curses { }; custom_printf = callPackage ../development/ocaml-modules/custom_printf { };