3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/ocaml-modules/curly/default.nix
sternenseemann 3a0933a030
ocamlPackages.{ipaddr,macaddr}: 3.1.0 → 5.0.0 and update all affected packages (tuntap, conduit, cohttp, …) (#91350)
* ocamlPackages.{ipaddr,macaddr}: 3.1.0 → 5.0.0
* ipaddr-cstruct: new package (since 4.0.0)
* ipaddr-sexp: new package (since 4.0.0)
* macaddr-cstruct: new package (since 4.0.0)
* macaddr-sexp: new package (since 4.0.0)
* macaddr: enable tests (don't depend on ipaddr anymore)
* ocamlPackages.tuntap: 1.3.0 → 2.0.0
* ocamlPackages.conduit{,-lwt,-lwt-unix}: 1.4.0 → 2.2.2
* ocamlPackages.cohttp{,-lwt,-lwt-unix}: 2.1.3 → 2.5.1
* ocamlPackages: use dune 2 if pkg (indirectly) depends on cohttp-lwt-unix

dune refuses to build a package if one of its dependencies uses dune 2.
2020-06-25 23:22:21 +02:00

30 lines
749 B
Nix

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