From 683f2f5ba2ea54abb633d0b17bc9f7f6dede5799 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Thu, 15 Jun 2023 13:21:03 +0200 Subject: [PATCH] ocamlPackage.{cohttp,github-unix}: fix for OCaml 5.0 (#237686) * ocamlPackages.cohttp: fix for OCaml 5.0 * ocamlPackages.github-unix: fix for OCaml 5.0 Co-authored-by: Ulrik Strid --- pkgs/development/ocaml-modules/cohttp/default.nix | 7 +++++-- pkgs/development/ocaml-modules/github/unix.nix | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/development/ocaml-modules/cohttp/default.nix b/pkgs/development/ocaml-modules/cohttp/default.nix index 4747b7b8ef4c..8a1df8618dbf 100644 --- a/pkgs/development/ocaml-modules/cohttp/default.nix +++ b/pkgs/development/ocaml-modules/cohttp/default.nix @@ -9,13 +9,16 @@ buildDunePackage rec { version = "5.1.0"; minimalOCamlVersion = "4.08"; - duneVersion = "3"; src = fetchurl { url = "https://github.com/mirage/ocaml-cohttp/releases/download/v${version}/cohttp-v${version}.tbz"; - sha256 = "sha256-mINgeBO7DSsWd84gYjQNUQFqbh8KBZ+S2bYI/iVWMAc="; + hash = "sha256-mINgeBO7DSsWd84gYjQNUQFqbh8KBZ+S2bYI/iVWMAc="; }; + postPatch = '' + substituteInPlace cohttp/src/dune --replace 'bytes base64' 'base64' + ''; + buildInputs = [ jsonm ppx_sexp_conv ]; propagatedBuildInputs = [ base64 re stringext uri-sexp ]; diff --git a/pkgs/development/ocaml-modules/github/unix.nix b/pkgs/development/ocaml-modules/github/unix.nix index 3f1897f82870..342be1069ce9 100644 --- a/pkgs/development/ocaml-modules/github/unix.nix +++ b/pkgs/development/ocaml-modules/github/unix.nix @@ -6,7 +6,9 @@ buildDunePackage { pname = "github-unix"; inherit (github) version src; - duneVersion = "3"; + postPatch = '' + substituteInPlace unix/dune --replace 'github bytes' 'github' + ''; propagatedBuildInputs = [ github