From a164dca9c9e54323e0edea889762716f53050955 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 20 Dec 2022 08:58:26 +0100 Subject: [PATCH] =?UTF-8?q?ocamlPackages.opium:=200.18.0=20=E2=86=92=200.2?= =?UTF-8?q?0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ocaml-modules/opium/default.nix | 70 +++++++++++++------ .../ocaml-modules/opium_kernel/default.nix | 44 ------------ pkgs/top-level/ocaml-packages.nix | 2 - 3 files changed, 50 insertions(+), 66 deletions(-) delete mode 100644 pkgs/development/ocaml-modules/opium_kernel/default.nix diff --git a/pkgs/development/ocaml-modules/opium/default.nix b/pkgs/development/ocaml-modules/opium/default.nix index 5db3d1b4a241..b98d892696ec 100644 --- a/pkgs/development/ocaml-modules/opium/default.nix +++ b/pkgs/development/ocaml-modules/opium/default.nix @@ -1,32 +1,62 @@ { buildDunePackage - -, ppx_sexp_conv -, ppx_fields_conv - +, lib +, fetchurl +, astring +, base64 , cmdliner -, cohttp-lwt-unix +, fmt +, httpaf +, httpaf-lwt-unix , logs , magic-mime -, opium_kernel -, stringext - -, alcotest +, mirage-crypto +, mtime +, multipart-form-data +, ptime +, re +, rock +, tyxml +, uri +, yojson +, alcotest-lwt }: -buildDunePackage { +buildDunePackage rec { pname = "opium"; - inherit (opium_kernel) version src meta minimumOCamlVersion; + minimalOCamlVersion = "4.08"; + duneVersion = "3"; - useDune2 = true; - - doCheck = true; - - buildInputs = [ - ppx_sexp_conv ppx_fields_conv - alcotest - ]; + inherit (rock) src version; propagatedBuildInputs = [ - opium_kernel cmdliner cohttp-lwt-unix magic-mime logs stringext + astring + base64 + cmdliner + fmt + httpaf + httpaf-lwt-unix + logs + magic-mime + mirage-crypto + mtime + multipart-form-data + ptime + re + rock + tyxml + uri + yojson ]; + + doCheck = true; + checkInputs = [ + alcotest-lwt + ]; + + meta = { + description = "OCaml web framework"; + homepage = "https://github.com/rgrinberg/opium"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.pmahoney ]; + }; } diff --git a/pkgs/development/ocaml-modules/opium_kernel/default.nix b/pkgs/development/ocaml-modules/opium_kernel/default.nix deleted file mode 100644 index 6b51443df232..000000000000 --- a/pkgs/development/ocaml-modules/opium_kernel/default.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ lib -, buildDunePackage -, fetchurl - -, ppx_fields_conv -, ppx_sexp_conv - -, cohttp-lwt -, ezjsonm -, hmap -, sexplib -, fieldslib -}: - -buildDunePackage rec { - pname = "opium_kernel"; - version = "0.18.0"; - - useDune2 = true; - - minimumOCamlVersion = "4.04.1"; - - src = fetchurl { - url = "https://github.com/rgrinberg/opium/releases/download/${version}/opium-${version}.tbz"; - sha256 = "0a2y9gw55psqhqli3a5ps9mfdab8r46fnbj882r2sp366sfcy37q"; - }; - - doCheck = true; - - buildInputs = [ - ppx_sexp_conv ppx_fields_conv - ]; - - propagatedBuildInputs = [ - hmap cohttp-lwt ezjsonm sexplib fieldslib - ]; - - meta = { - description = "Sinatra like web toolkit for OCaml based on cohttp & lwt"; - homepage = "https://github.com/rgrinberg/opium"; - license = lib.licenses.mit; - maintainers = [ lib.maintainers.pmahoney ]; - }; -} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 6a8ce3aec370..0f9762d8157b 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1108,8 +1108,6 @@ let opium = callPackage ../development/ocaml-modules/opium { }; - opium_kernel = callPackage ../development/ocaml-modules/opium_kernel { }; - opti = callPackage ../development/ocaml-modules/opti { }; optint = callPackage ../development/ocaml-modules/optint { };