Loading pkgs/development/ocaml-modules/dream/default.nix 0 → 100644 +67 −0 Original line number Diff line number Diff line { lib, buildDunePackage, dream-pure, lwt_ppx, camlp-streams, caqti-lwt, cstruct, digestif, dream-httpaf, graphql-lwt, h2-lwt-unix, httpun-lwt-unix, httpun-ws, lambdasoup, lwt_ssl, magic-mime, markup, mirage-clock, mirage-crypto-rng, mirage-crypto-rng-lwt, multipart_form-lwt, ssl, unstrctrd, uri, yojson, }: buildDunePackage { pname = "dream"; inherit (dream-pure) version src; # Compatibility with httpun 0.2.0 and h2 0.13 patches = [ ./httpun.patch ]; buildInputs = [ lwt_ppx ]; propagatedBuildInputs = [ camlp-streams caqti-lwt cstruct digestif dream-httpaf dream-pure graphql-lwt h2-lwt-unix httpun-lwt-unix httpun-ws lambdasoup lwt_ssl magic-mime markup mirage-clock mirage-crypto-rng mirage-crypto-rng-lwt multipart_form-lwt ssl unstrctrd uri yojson ]; meta = dream-pure.meta // { description = "Tidy, feature-complete Web framework"; }; } pkgs/development/ocaml-modules/dream/httpun.patch 0 → 100644 +20 −0 Original line number Diff line number Diff line diff --git a/src/http/adapt.ml b/src/http/adapt.ml index c6bd416..5b01e17 100644 --- a/src/http/adapt.ml +++ b/src/http/adapt.ml @@ -74,7 +74,7 @@ let forward_body response (Httpun.Body.Writer.write_string body) (Httpun.Body.Writer.write_bigstring body) - (Httpun.Body.Writer.flush body) + (fun f -> Httpun.Body.Writer.flush body (fun _ -> f ())) (fun _code -> Httpun.Body.Writer.close body) let forward_body_h2 @@ -85,5 +85,5 @@ let forward_body_h2 response (H2.Body.Writer.write_string body) (H2.Body.Writer.write_bigstring body) - (H2.Body.Writer.flush body) + (fun f -> H2.Body.Writer.flush body (fun _ -> f ())) (fun _code -> H2.Body.Writer.close body) pkgs/top-level/ocaml-packages.nix +2 −0 Original line number Diff line number Diff line Loading @@ -383,6 +383,8 @@ let dot-merlin-reader = callPackage ../development/tools/ocaml/merlin/dot-merlin-reader.nix { }; dream = callPackage ../development/ocaml-modules/dream { }; dream-httpaf = callPackage ../development/ocaml-modules/dream/httpaf.nix { }; dream-pure = callPackage ../development/ocaml-modules/dream/pure.nix { }; Loading Loading
pkgs/development/ocaml-modules/dream/default.nix 0 → 100644 +67 −0 Original line number Diff line number Diff line { lib, buildDunePackage, dream-pure, lwt_ppx, camlp-streams, caqti-lwt, cstruct, digestif, dream-httpaf, graphql-lwt, h2-lwt-unix, httpun-lwt-unix, httpun-ws, lambdasoup, lwt_ssl, magic-mime, markup, mirage-clock, mirage-crypto-rng, mirage-crypto-rng-lwt, multipart_form-lwt, ssl, unstrctrd, uri, yojson, }: buildDunePackage { pname = "dream"; inherit (dream-pure) version src; # Compatibility with httpun 0.2.0 and h2 0.13 patches = [ ./httpun.patch ]; buildInputs = [ lwt_ppx ]; propagatedBuildInputs = [ camlp-streams caqti-lwt cstruct digestif dream-httpaf dream-pure graphql-lwt h2-lwt-unix httpun-lwt-unix httpun-ws lambdasoup lwt_ssl magic-mime markup mirage-clock mirage-crypto-rng mirage-crypto-rng-lwt multipart_form-lwt ssl unstrctrd uri yojson ]; meta = dream-pure.meta // { description = "Tidy, feature-complete Web framework"; }; }
pkgs/development/ocaml-modules/dream/httpun.patch 0 → 100644 +20 −0 Original line number Diff line number Diff line diff --git a/src/http/adapt.ml b/src/http/adapt.ml index c6bd416..5b01e17 100644 --- a/src/http/adapt.ml +++ b/src/http/adapt.ml @@ -74,7 +74,7 @@ let forward_body response (Httpun.Body.Writer.write_string body) (Httpun.Body.Writer.write_bigstring body) - (Httpun.Body.Writer.flush body) + (fun f -> Httpun.Body.Writer.flush body (fun _ -> f ())) (fun _code -> Httpun.Body.Writer.close body) let forward_body_h2 @@ -85,5 +85,5 @@ let forward_body_h2 response (H2.Body.Writer.write_string body) (H2.Body.Writer.write_bigstring body) - (H2.Body.Writer.flush body) + (fun f -> H2.Body.Writer.flush body (fun _ -> f ())) (fun _code -> H2.Body.Writer.close body)
pkgs/top-level/ocaml-packages.nix +2 −0 Original line number Diff line number Diff line Loading @@ -383,6 +383,8 @@ let dot-merlin-reader = callPackage ../development/tools/ocaml/merlin/dot-merlin-reader.nix { }; dream = callPackage ../development/ocaml-modules/dream { }; dream-httpaf = callPackage ../development/ocaml-modules/dream/httpaf.nix { }; dream-pure = callPackage ../development/ocaml-modules/dream/pure.nix { }; Loading