From e485b10d3e9ef58f3229f39eb9ed26ff04c92f31 Mon Sep 17 00:00:00 2001 From: Patrick Mahoney Date: Sat, 1 Jun 2019 20:37:44 -0500 Subject: [PATCH] ocamlPackages.opium: init at 0.17.1 --- .../ocaml-modules/opium/default.nix | 30 +++++++++++++ .../ocaml-modules/opium_kernel/default.nix | 42 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 4 ++ 3 files changed, 76 insertions(+) create mode 100644 pkgs/development/ocaml-modules/opium/default.nix create 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 new file mode 100644 index 000000000000..06784b445e3b --- /dev/null +++ b/pkgs/development/ocaml-modules/opium/default.nix @@ -0,0 +1,30 @@ +{ buildDunePackage + +, ppx_sexp_conv +, ppx_fields_conv + +, cmdliner +, cohttp-lwt-unix +, logs +, magic-mime +, opium_kernel +, stringext + +, alcotest +}: + +buildDunePackage rec { + pname = "opium"; + inherit (opium_kernel) version src meta minimumOCamlVersion; + + doCheck = true; + + buildInputs = [ + ppx_sexp_conv ppx_fields_conv + alcotest + ]; + + propagatedBuildInputs = [ + opium_kernel cmdliner cohttp-lwt-unix magic-mime logs stringext + ]; +} diff --git a/pkgs/development/ocaml-modules/opium_kernel/default.nix b/pkgs/development/ocaml-modules/opium_kernel/default.nix new file mode 100644 index 000000000000..8388e108feff --- /dev/null +++ b/pkgs/development/ocaml-modules/opium_kernel/default.nix @@ -0,0 +1,42 @@ +{ lib +, buildDunePackage +, fetchFromGitHub + +, ppx_fields_conv +, ppx_sexp_conv + +, cohttp-lwt +, ezjsonm +, hmap +}: + +buildDunePackage rec { + pname = "opium_kernel"; + version = "0.17.1"; + + minimumOCamlVersion = "4.04.1"; + + src = fetchFromGitHub { + owner = "rgrinberg"; + repo = "opium"; + rev = "v${version}"; + sha256 = "03xzh0ik6k3c0yn1w1avph667vdagwclzimwwrlf9qdxnzxvcnp3"; + }; + + doCheck = true; + + buildInputs = [ + ppx_sexp_conv ppx_fields_conv + ]; + + propagatedBuildInputs = [ + hmap cohttp-lwt ezjsonm + ]; + + 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 2f093add6046..ffa25ada3e7b 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -553,6 +553,10 @@ let opam-file-format = callPackage ../development/ocaml-modules/opam-file-format { }; + 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 { };