aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/curly/default.nix
blob: a17ea72140ff1f17d312af53c5c83da2c65dd1c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ lib, buildDunePackage, fetchFromGitHub, ocaml
, result, alcotest, cohttp-lwt-unix, odoc, curl }:

buildDunePackage rec {
  pname = "curly";
  version = "unstable-2019-11-14";

  minimumOCamlVersion = "4.02";

  useDune2 = true;

  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\""
    '';
}