From b1c18d0fc663dd03172e7c921fb5272b8033a84f Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Tue, 29 Dec 2020 22:22:38 +0100 Subject: [PATCH] ocamlPackages.dns*: add missing related packages * dns-certify * dns-cli * dns-mirage * dns-resolver * dns-server * dns-stub * dns-tsig --- .../development/ocaml-modules/dns/certify.nix | 33 +++++++++++++ pkgs/development/ocaml-modules/dns/cli.nix | 48 +++++++++++++++++++ pkgs/development/ocaml-modules/dns/mirage.nix | 18 +++++++ .../ocaml-modules/dns/resolver.nix | 32 +++++++++++++ pkgs/development/ocaml-modules/dns/server.nix | 34 +++++++++++++ pkgs/development/ocaml-modules/dns/stub.nix | 33 +++++++++++++ pkgs/development/ocaml-modules/dns/tsig.nix | 22 +++++++++ pkgs/top-level/ocaml-packages.nix | 14 ++++++ 8 files changed, 234 insertions(+) create mode 100644 pkgs/development/ocaml-modules/dns/certify.nix create mode 100644 pkgs/development/ocaml-modules/dns/cli.nix create mode 100644 pkgs/development/ocaml-modules/dns/mirage.nix create mode 100644 pkgs/development/ocaml-modules/dns/resolver.nix create mode 100644 pkgs/development/ocaml-modules/dns/server.nix create mode 100644 pkgs/development/ocaml-modules/dns/stub.nix create mode 100644 pkgs/development/ocaml-modules/dns/tsig.nix diff --git a/pkgs/development/ocaml-modules/dns/certify.nix b/pkgs/development/ocaml-modules/dns/certify.nix new file mode 100644 index 000000000000..1835114d707c --- /dev/null +++ b/pkgs/development/ocaml-modules/dns/certify.nix @@ -0,0 +1,33 @@ +{ buildDunePackage, dns, dns-tsig, dns-mirage, randomconv, x509 +, mirage-random, mirage-time, mirage-clock, mirage-stack +, logs, mirage-crypto-pk, mirage-crypto-rng, tls, lwt +}: + +buildDunePackage { + pname = "dns-certify"; + + inherit (dns) version src useDune2 minimumOCamlVersion; + + propagatedBuildInputs = [ + dns + dns-tsig + dns-mirage + randomconv + x509 + mirage-random + mirage-time + mirage-clock + mirage-stack + logs + mirage-crypto-pk + mirage-crypto-rng + tls + lwt + ]; + + doCheck = true; + + meta = dns.meta // { + description = "MirageOS let's encrypt certificate retrieval"; + }; +} diff --git a/pkgs/development/ocaml-modules/dns/cli.nix b/pkgs/development/ocaml-modules/dns/cli.nix new file mode 100644 index 000000000000..6e149180642d --- /dev/null +++ b/pkgs/development/ocaml-modules/dns/cli.nix @@ -0,0 +1,48 @@ +{ buildDunePackage, dns, dns-tsig, dns-client, dns-server, dns-certify +, rresult, bos, cmdliner, fpath, x509, mirage-crypto, mirage-crypto-pk +, mirage-crypto-rng, hex, ptime, mtime, logs, fmt, ipaddr, lwt +, randomconv, alcotest +}: + +buildDunePackage { + pname = "dns-cli"; + + minimumOCamlVersion = "4.08"; + + inherit (dns) version src useDune2; + + # no need to propagate as this is primarily + # an executable package + buildInputs = [ + dns + dns-tsig + dns-client + dns-server + dns-certify + rresult + bos + cmdliner + fpath + x509 + mirage-crypto + mirage-crypto-pk + mirage-crypto-rng + hex + ptime + mtime + logs + fmt + ipaddr + lwt + randomconv + ]; + + doCheck = true; + checkInputs = [ + alcotest + ]; + + meta = dns.meta // { + description = "Unix command line utilities using uDNS"; + }; +} diff --git a/pkgs/development/ocaml-modules/dns/mirage.nix b/pkgs/development/ocaml-modules/dns/mirage.nix new file mode 100644 index 000000000000..4a45abba68e2 --- /dev/null +++ b/pkgs/development/ocaml-modules/dns/mirage.nix @@ -0,0 +1,18 @@ +{ buildDunePackage, dns, mirage-stack, ipaddr, lwt }: + +buildDunePackage { + pname = "dns-mirage"; + + inherit (dns) version src useDune2 minimumOCamlVersion; + + propagatedBuildInputs = [ + dns + mirage-stack + ipaddr + lwt + ]; + + meta = dns.meta // { + description = "An opinionated Domain Name System (DNS) library"; + }; +} diff --git a/pkgs/development/ocaml-modules/dns/resolver.nix b/pkgs/development/ocaml-modules/dns/resolver.nix new file mode 100644 index 000000000000..121ecb588d02 --- /dev/null +++ b/pkgs/development/ocaml-modules/dns/resolver.nix @@ -0,0 +1,32 @@ +{ buildDunePackage, dns, dns-server, dns-mirage, lru, duration +, randomconv, lwt, mirage-time, mirage-clock, mirage-random +, alcotest +}: + +buildDunePackage { + pname = "dns-resolver"; + + inherit (dns) version src useDune2 minimumOCamlVersion; + + propagatedBuildInputs = [ + dns + dns-server + dns-mirage + lru + duration + randomconv + lwt + mirage-time + mirage-clock + mirage-random + ]; + + doCheck = true; + checkInputs = [ + alcotest + ]; + + meta = dns.meta // { + description = "DNS resolver business logic"; + }; +} diff --git a/pkgs/development/ocaml-modules/dns/server.nix b/pkgs/development/ocaml-modules/dns/server.nix new file mode 100644 index 000000000000..1dc001f5f808 --- /dev/null +++ b/pkgs/development/ocaml-modules/dns/server.nix @@ -0,0 +1,34 @@ +{ buildDunePackage, dns, dns-mirage, randomconv, duration, lwt +, mirage-time, mirage-clock, mirage-stack, metrics +, alcotest, mirage-crypto-rng, dns-tsig, base64 +}: + +buildDunePackage { + pname = "dns-server"; + + inherit (dns) version src useDune2 minimumOCamlVersion; + + propagatedBuildInputs = [ + dns + dns-mirage + randomconv + duration + lwt + mirage-time + mirage-clock + mirage-stack + metrics + ]; + + doCheck = true; + checkInputs = [ + alcotest + mirage-crypto-rng + dns-tsig + base64 + ]; + + meta = dns.meta // { + description = "DNS server, primary and secondary"; + }; +} diff --git a/pkgs/development/ocaml-modules/dns/stub.nix b/pkgs/development/ocaml-modules/dns/stub.nix new file mode 100644 index 000000000000..dfe623f1c500 --- /dev/null +++ b/pkgs/development/ocaml-modules/dns/stub.nix @@ -0,0 +1,33 @@ +{ buildDunePackage, dns, dns-client, dns-mirage, dns-resolver, dns-tsig +, dns-server, duration, randomconv, lwt, mirage-time, mirage-clock +, mirage-random, mirage-stack, metrics +}: + +buildDunePackage { + pname = "dns-stub"; + + inherit (dns) version src useDune2 minimumOCamlVersion; + + propagatedBuildInputs = [ + dns + dns-client + dns-mirage + dns-resolver + dns-tsig + dns-server + duration + randomconv + lwt + mirage-time + mirage-clock + mirage-random + mirage-stack + metrics + ]; + + doCheck = true; + + meta = dns.meta // { + description = "DNS stub resolver"; + }; +} diff --git a/pkgs/development/ocaml-modules/dns/tsig.nix b/pkgs/development/ocaml-modules/dns/tsig.nix new file mode 100644 index 000000000000..11786a21e0dc --- /dev/null +++ b/pkgs/development/ocaml-modules/dns/tsig.nix @@ -0,0 +1,22 @@ +{ buildDunePackage, dns, mirage-crypto, base64, alcotest }: + +buildDunePackage { + pname = "dns-tsig"; + + inherit (dns) version src useDune2 minimumOCamlVersion; + + propagatedBuildInputs = [ + mirage-crypto + dns + base64 + ]; + + doCheck = true; + checkInputs = [ + alcotest + ]; + + meta = dns.meta // { + description = "TSIG support for DNS"; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 80c5c0a5a8a3..02110607734f 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -205,8 +205,22 @@ let dns = callPackage ../development/ocaml-modules/dns { }; + dns-certify = callPackage ../development/ocaml-modules/dns/certify.nix { }; + + dns-cli = callPackage ../development/ocaml-modules/dns/cli.nix { }; + dns-client = callPackage ../development/ocaml-modules/dns/client.nix { }; + dns-mirage = callPackage ../development/ocaml-modules/dns/mirage.nix { }; + + dns-resolver = callPackage ../development/ocaml-modules/dns/resolver.nix { }; + + dns-server = callPackage ../development/ocaml-modules/dns/server.nix { }; + + dns-stub = callPackage ../development/ocaml-modules/dns/stub.nix { }; + + dns-tsig = callPackage ../development/ocaml-modules/dns/tsig.nix { }; + dolmen = callPackage ../development/ocaml-modules/dolmen { }; dolog = callPackage ../development/ocaml-modules/dolog { };