about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules
diff options
context:
space:
mode:
authorsuperherointj <5861043+superherointj@users.noreply.github.com>2021-06-07 13:47:03 -0300
committerVincent Laporte <vbgl@users.noreply.github.com>2021-06-18 12:44:54 +0200
commitc7bcbf5665fd6d6807e58cfab8cadfb029d3275c (patch)
tree0b86cfbf27eb695213b553db38b887067da80b67 /pkgs/development/ocaml-modules
parent810b2d52fc6355f10131c1343b14e19ab65ac516 (diff)
downloadnixlib-c7bcbf5665fd6d6807e58cfab8cadfb029d3275c.tar
nixlib-c7bcbf5665fd6d6807e58cfab8cadfb029d3275c.tar.gz
nixlib-c7bcbf5665fd6d6807e58cfab8cadfb029d3275c.tar.bz2
nixlib-c7bcbf5665fd6d6807e58cfab8cadfb029d3275c.tar.lz
nixlib-c7bcbf5665fd6d6807e58cfab8cadfb029d3275c.tar.xz
nixlib-c7bcbf5665fd6d6807e58cfab8cadfb029d3275c.tar.zst
nixlib-c7bcbf5665fd6d6807e58cfab8cadfb029d3275c.zip
ocamlPackages.tls: refactoring
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r--pkgs/development/ocaml-modules/tls/default.nix44
-rw-r--r--pkgs/development/ocaml-modules/tls/mirage.nix20
2 files changed, 40 insertions, 24 deletions
diff --git a/pkgs/development/ocaml-modules/tls/default.nix b/pkgs/development/ocaml-modules/tls/default.nix
index dadeb5a98eaf..bcaab464c74b 100644
--- a/pkgs/development/ocaml-modules/tls/default.nix
+++ b/pkgs/development/ocaml-modules/tls/default.nix
@@ -1,28 +1,46 @@
-{ lib, fetchurl, buildDunePackage, ppx_sexp_conv, ppx_cstruct, cstruct
-, cstruct-sexp, sexplib, mirage-crypto, mirage-crypto-pk, mirage-crypto-rng
-, x509, domain-name, fmt, cstruct-unix, ounit2, ocaml_lwt, ptime, rresult
-, mirage-crypto-ec, hkdf, logs, alcotest }:
+{ lib, fetchurl, buildDunePackage
+, cstruct, cstruct-sexp, domain-name, fmt, ppx_cstruct, ppx_sexp_conv, logs, hkdf, mirage-crypto, mirage-crypto-ec, mirage-crypto-pk, mirage-crypto-rng, ocaml_lwt, ptime, rresult, sexplib, x509
+, alcotest, cstruct-unix, ounit2
+}:
 
 buildDunePackage rec {
-  minimumOCamlVersion = "4.08";
-
-  version = "0.13.1";
   pname = "tls";
+  version = "0.13.1";
 
   src = fetchurl {
     url = "https://github.com/mirleft/ocaml-tls/releases/download/v${version}/tls-v${version}.tbz";
     sha256 = "ca95fa59a82f7d38b0b495fc0cd1ff54e7728492a292895d0067c1ba9de81b7b";
   };
 
+  minimumOCamlVersion = "4.08";
   useDune2 = true;
 
-  doCheck = true;
-  checkInputs = [ cstruct-unix ounit2 alcotest ];
+  propagatedBuildInputs = [
+    cstruct
+    cstruct-sexp
+    domain-name
+    fmt
+    ppx_cstruct
+    ppx_sexp_conv
+    logs
+    hkdf
+    mirage-crypto
+    mirage-crypto-ec
+    mirage-crypto-pk
+    mirage-crypto-rng
+    ocaml_lwt
+    ptime
+    rresult
+    sexplib
+    x509
+  ];
 
-  propagatedBuildInputs = [ ppx_sexp_conv ppx_cstruct cstruct cstruct-sexp
-                            sexplib mirage-crypto mirage-crypto-pk mirage-crypto-rng
-                            x509 domain-name fmt ocaml_lwt ptime mirage-crypto-ec
-                            hkdf logs rresult ];
+  doCheck = true;
+  checkInputs = [
+    alcotest
+    cstruct-unix
+    ounit2
+  ];
 
   meta = with lib; {
     homepage = "https://github.com/mirleft/ocaml-tls";
diff --git a/pkgs/development/ocaml-modules/tls/mirage.nix b/pkgs/development/ocaml-modules/tls/mirage.nix
index 18d0f08357d4..a0428536b813 100644
--- a/pkgs/development/ocaml-modules/tls/mirage.nix
+++ b/pkgs/development/ocaml-modules/tls/mirage.nix
@@ -1,25 +1,23 @@
 { buildDunePackage, tls
-, x509, lwt, fmt, mirage-flow, mirage-kv, mirage-clock, ptime
-, mirage-crypto, mirage-crypto-pk, mirage-crypto-ec
+, fmt, lwt, mirage-clock, mirage-crypto, mirage-crypto-ec, mirage-crypto-pk, mirage-flow, mirage-kv, ptime, x509
 }:
 
 buildDunePackage {
   pname = "tls-mirage";
-
-  inherit (tls) version src useDune2 minimumOCamlVersion;
+  inherit (tls) src version minimumOCamlVersion useDune2;
 
   propagatedBuildInputs = [
-    tls
-    x509
-    lwt
     fmt
-    mirage-flow
-    mirage-kv
+    lwt
     mirage-clock
-    ptime
     mirage-crypto
-    mirage-crypto-pk
     mirage-crypto-ec
+    mirage-crypto-pk
+    mirage-flow
+    mirage-kv
+    ptime
+    tls
+    x509
   ];
 
   meta = tls.meta // {