summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/resto
diff options
context:
space:
mode:
authorUlrik Strid <ulrik.strid@outlook.com>2021-07-15 09:34:54 +0200
committerGitHub <noreply@github.com>2021-07-15 09:34:54 +0200
commit0f4cee585abe6290aae9fc744108e39814a1eb75 (patch)
tree319d4362c1f6b4d08509f7343571c99e4a8470b5 /pkgs/development/ocaml-modules/resto
parentf314e2c1414185abaa58f4fcacf54a290379462c (diff)
downloadnixpkgs-0f4cee585abe6290aae9fc744108e39814a1eb75.tar
nixpkgs-0f4cee585abe6290aae9fc744108e39814a1eb75.tar.gz
nixpkgs-0f4cee585abe6290aae9fc744108e39814a1eb75.tar.bz2
nixpkgs-0f4cee585abe6290aae9fc744108e39814a1eb75.tar.lz
nixpkgs-0f4cee585abe6290aae9fc744108e39814a1eb75.tar.xz
nixpkgs-0f4cee585abe6290aae9fc744108e39814a1eb75.tar.zst
nixpkgs-0f4cee585abe6290aae9fc744108e39814a1eb75.zip
ocamlPackages.resto: init at 0.6.1 (#129522)
ocamlPackages.resto:  init at 0.6.1
ocamlPackages.resto-acl:  init at 0.6.1
ocamlPackages.resto-json:  init at 0.6.1
ocamlPackages.resto-directory:  init at 0.6.1
ocamlPackages.resto-cohttp:  init at 0.6.1
ocamlPackages.ezresto:  init at 0.6.1
ocamlPackages.ezresto-directory:  init at 0.6.1
ocamlPackages.resto-cohttp-server:  init at 0.6.1
ocamlPackages.resto-cohttp-client:  init at 0.6.1
ocamlPackages.resto-cohttp-self-serving-client:  init at 0.6.1
Diffstat (limited to 'pkgs/development/ocaml-modules/resto')
-rw-r--r--pkgs/development/ocaml-modules/resto/acl.nix13
-rw-r--r--pkgs/development/ocaml-modules/resto/cohttp-client.nix20
-rw-r--r--pkgs/development/ocaml-modules/resto/cohttp-self-serving-client.nix27
-rw-r--r--pkgs/development/ocaml-modules/resto/cohttp-server.nix25
-rw-r--r--pkgs/development/ocaml-modules/resto/cohttp.nix12
-rw-r--r--pkgs/development/ocaml-modules/resto/default.nix28
-rw-r--r--pkgs/development/ocaml-modules/resto/directory.nix11
-rw-r--r--pkgs/development/ocaml-modules/resto/ezresto-directory.nix13
-rw-r--r--pkgs/development/ocaml-modules/resto/ezresto.nix12
-rw-r--r--pkgs/development/ocaml-modules/resto/json.nix12
10 files changed, 173 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/resto/acl.nix b/pkgs/development/ocaml-modules/resto/acl.nix
new file mode 100644
index 00000000000..7ac05cd62da
--- /dev/null
+++ b/pkgs/development/ocaml-modules/resto/acl.nix
@@ -0,0 +1,13 @@
+{ lib, buildDunePackage, resto, uri }:
+
+buildDunePackage {
+  pname = "resto-acl";
+  inherit (resto) src version meta useDune2 doCheck;
+
+    minimalOCamlVersion = "4.05";
+
+  propagatedBuildInputs = [
+    resto
+    uri
+  ];
+}
diff --git a/pkgs/development/ocaml-modules/resto/cohttp-client.nix b/pkgs/development/ocaml-modules/resto/cohttp-client.nix
new file mode 100644
index 00000000000..2dc651045ba
--- /dev/null
+++ b/pkgs/development/ocaml-modules/resto/cohttp-client.nix
@@ -0,0 +1,20 @@
+{ buildDunePackage
+, resto
+, resto-directory
+, resto-cohttp
+, uri
+, lwt
+}:
+
+buildDunePackage {
+  pname = "resto-cohttp-client";
+  inherit (resto) src version meta useDune2 doCheck;
+
+  propagatedBuildInputs = [
+    resto
+    resto-directory
+    resto-cohttp
+    uri
+    lwt
+  ];
+}
diff --git a/pkgs/development/ocaml-modules/resto/cohttp-self-serving-client.nix b/pkgs/development/ocaml-modules/resto/cohttp-self-serving-client.nix
new file mode 100644
index 00000000000..88f2ef25e6a
--- /dev/null
+++ b/pkgs/development/ocaml-modules/resto/cohttp-self-serving-client.nix
@@ -0,0 +1,27 @@
+{ lib
+, buildDunePackage
+, resto
+, resto-directory
+, resto-acl
+, resto-cohttp
+, resto-cohttp-client
+, resto-cohttp-server
+, uri
+, lwt
+}:
+
+buildDunePackage {
+  pname = "resto-cohttp-self-serving-client";
+  inherit (resto) src version meta useDune2 doCheck;
+
+  propagatedBuildInputs = [
+    resto
+    resto-directory
+    resto-acl
+    resto-cohttp
+    resto-cohttp-client
+    resto-cohttp-server
+    uri
+    lwt
+  ];
+}
diff --git a/pkgs/development/ocaml-modules/resto/cohttp-server.nix b/pkgs/development/ocaml-modules/resto/cohttp-server.nix
new file mode 100644
index 00000000000..61a5d93e9fc
--- /dev/null
+++ b/pkgs/development/ocaml-modules/resto/cohttp-server.nix
@@ -0,0 +1,25 @@
+{ lib
+, buildDunePackage
+, resto
+, resto-directory
+, resto-acl
+, resto-cohttp
+, cohttp-lwt-unix
+, conduit-lwt-unix
+, lwt
+}:
+
+buildDunePackage {
+  pname = "resto-cohttp-server";
+  inherit (resto) src version meta useDune2 doCheck;
+
+  propagatedBuildInputs = [
+    resto
+    resto-directory
+    resto-acl
+    resto-cohttp
+    cohttp-lwt-unix
+    conduit-lwt-unix
+    lwt
+  ];
+}
diff --git a/pkgs/development/ocaml-modules/resto/cohttp.nix b/pkgs/development/ocaml-modules/resto/cohttp.nix
new file mode 100644
index 00000000000..c29e589057c
--- /dev/null
+++ b/pkgs/development/ocaml-modules/resto/cohttp.nix
@@ -0,0 +1,12 @@
+{ buildDunePackage, resto, resto-directory, cohttp-lwt }:
+
+buildDunePackage {
+  pname = "resto-cohttp";
+  inherit (resto) src version meta useDune2 doCheck;
+
+  propagatedBuildInputs = [
+    resto
+    resto-directory
+    cohttp-lwt
+  ];
+}
diff --git a/pkgs/development/ocaml-modules/resto/default.nix b/pkgs/development/ocaml-modules/resto/default.nix
new file mode 100644
index 00000000000..13d55b1af21
--- /dev/null
+++ b/pkgs/development/ocaml-modules/resto/default.nix
@@ -0,0 +1,28 @@
+{ lib, fetchFromGitLab, buildDunePackage, uri }:
+
+buildDunePackage rec {
+  pname = "resto";
+  version = "0.6.1";
+  src = fetchFromGitLab {
+    owner = "nomadic-labs";
+    repo = "resto";
+    rev = "v${version}";
+    sha256 = "13h3zga7h2jhgbyda1q53szbpxcz3vvy3c51mlqk3jh9jq2wrn87";
+  };
+
+  useDune2 = true;
+
+  propagatedBuildInputs = [
+    uri
+  ];
+
+  # resto has infinite recursion in their tests
+  doCheck = false;
+
+  meta = {
+    description = "A minimal OCaml library for type-safe HTTP/JSON RPCs";
+    homepage = "https://gitlab.com/nomadic-labs/resto";
+    license = lib.licenses.mit;
+    maintainers = [ lib.maintainers.ulrikstrid ];
+  };
+}
diff --git a/pkgs/development/ocaml-modules/resto/directory.nix b/pkgs/development/ocaml-modules/resto/directory.nix
new file mode 100644
index 00000000000..7539bf98ffd
--- /dev/null
+++ b/pkgs/development/ocaml-modules/resto/directory.nix
@@ -0,0 +1,11 @@
+{ lib, buildDunePackage, resto, resto-json, lwt }:
+
+buildDunePackage {
+  pname = "resto-directory";
+  inherit (resto) src version meta useDune2 doCheck;
+
+  propagatedBuildInputs = [
+    resto
+    lwt
+  ];
+}
diff --git a/pkgs/development/ocaml-modules/resto/ezresto-directory.nix b/pkgs/development/ocaml-modules/resto/ezresto-directory.nix
new file mode 100644
index 00000000000..fa208cc3fbb
--- /dev/null
+++ b/pkgs/development/ocaml-modules/resto/ezresto-directory.nix
@@ -0,0 +1,13 @@
+{ buildDunePackage, resto, resto-directory, ezresto, lwt }:
+
+buildDunePackage {
+  pname = "ezresto-directory";
+  inherit (resto) src version meta useDune2 doCheck;
+
+  propagatedBuildInputs = [
+    ezresto
+    resto-directory
+    resto
+    lwt
+  ];
+}
diff --git a/pkgs/development/ocaml-modules/resto/ezresto.nix b/pkgs/development/ocaml-modules/resto/ezresto.nix
new file mode 100644
index 00000000000..8b3b2c6cd71
--- /dev/null
+++ b/pkgs/development/ocaml-modules/resto/ezresto.nix
@@ -0,0 +1,12 @@
+{ lib, buildDunePackage, resto, resto-json, uri }:
+
+buildDunePackage {
+  pname = "ezresto";
+  inherit (resto) src version meta useDune2 doCheck;
+
+  propagatedBuildInputs = [
+    uri
+    resto
+    resto-json
+  ];
+}
diff --git a/pkgs/development/ocaml-modules/resto/json.nix b/pkgs/development/ocaml-modules/resto/json.nix
new file mode 100644
index 00000000000..e861cac6d31
--- /dev/null
+++ b/pkgs/development/ocaml-modules/resto/json.nix
@@ -0,0 +1,12 @@
+{ lib, buildDunePackage, resto, json-data-encoding, json-data-encoding-bson }:
+
+buildDunePackage {
+  pname = "resto-json";
+  inherit (resto) src version meta useDune2 doCheck;
+
+  propagatedBuildInputs = [
+    resto
+    json-data-encoding
+    json-data-encoding-bson
+  ];
+}