about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/getdns
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2022-01-03 23:55:00 +0000
committerAlyssa Ross <hi@alyssa.is>2022-02-19 11:03:39 +0000
commitf4cf97a04cd5d0b86aa46baec9fb228a8f671c03 (patch)
tree28192415ff39a661d0001563bf81cc93fa25d16d /nixpkgs/pkgs/development/libraries/getdns
parentf8422837c9bde058e8f2de37702e7e94b2226040 (diff)
parent18c84ea816348e2a098390101b92d1e39a9dbd45 (diff)
downloadnixlib-f4cf97a04cd5d0b86aa46baec9fb228a8f671c03.tar
nixlib-f4cf97a04cd5d0b86aa46baec9fb228a8f671c03.tar.gz
nixlib-f4cf97a04cd5d0b86aa46baec9fb228a8f671c03.tar.bz2
nixlib-f4cf97a04cd5d0b86aa46baec9fb228a8f671c03.tar.lz
nixlib-f4cf97a04cd5d0b86aa46baec9fb228a8f671c03.tar.xz
nixlib-f4cf97a04cd5d0b86aa46baec9fb228a8f671c03.tar.zst
nixlib-f4cf97a04cd5d0b86aa46baec9fb228a8f671c03.zip
Merge commit '18c84ea816348e2a098390101b92d1e39a9dbd45'
Conflicts:
	nixpkgs/nixos/modules/misc/documentation.nix
	nixpkgs/pkgs/applications/networking/browsers/firefox/packages.nix
	nixpkgs/pkgs/applications/window-managers/sway/default.nix
	nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix
	nixpkgs/pkgs/development/go-modules/generic/default.nix
	nixpkgs/pkgs/development/interpreters/ruby/default.nix
	nixpkgs/pkgs/development/interpreters/ruby/patchsets.nix
	nixpkgs/pkgs/development/libraries/boehm-gc/7.6.6.nix
	nixpkgs/pkgs/development/python-modules/django-mailman3/default.nix
	nixpkgs/pkgs/servers/mail/mailman/web.nix
	nixpkgs/pkgs/top-level/aliases.nix
	nixpkgs/pkgs/top-level/all-packages.nix
	nixpkgs/pkgs/top-level/impure.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/getdns')
-rw-r--r--nixpkgs/pkgs/development/libraries/getdns/default.nix112
1 files changed, 81 insertions, 31 deletions
diff --git a/nixpkgs/pkgs/development/libraries/getdns/default.nix b/nixpkgs/pkgs/development/libraries/getdns/default.nix
index edf0ac27ea97..1db1c3737bcc 100644
--- a/nixpkgs/pkgs/development/libraries/getdns/default.nix
+++ b/nixpkgs/pkgs/development/libraries/getdns/default.nix
@@ -1,37 +1,87 @@
-{ lib, stdenv, fetchurl, unbound, libidn2, openssl, doxygen, cmake }:
-
-stdenv.mkDerivation rec {
-  pname = "getdns";
-  version = "1.6.0";
-  versionRewrite = builtins.splitVersion version;
-
-  src = fetchurl {
-    url = "https://getdnsapi.net/releases/${pname}-${
-        builtins.concatStringsSep "-" versionRewrite
-      }/${pname}-${version}.tar.gz";
-    sha256 = "0jhg7258wz287kjymimvdvv04n69lwxdc3sb62l2p453f5s77ra0";
-  };
+# Getdns and Stubby are released together, see https://getdnsapi.net/releases/
 
-  nativeBuildInputs = [ cmake ];
-
-  buildInputs = [ unbound libidn2 openssl doxygen ];
-
-  meta = with lib; {
-    description = "A modern asynchronous DNS API";
-    longDescription = ''
-      getdns is an implementation of a modern asynchronous DNS API; the
-      specification was originally edited by Paul Hoffman. It is intended to make all
-      types of DNS information easily available to application developers and non-DNS
-      experts. DNSSEC offers a unique global infrastructure for establishing and
-      enhancing cryptographic trust relations. With the development of this API the
-      developers intend to offer application developers a modern and flexible
-      interface that enables end-to-end trust in the DNS architecture, and which will
-      inspire application developers to implement innovative security solutions in
-      their applications.
-    '';
-    homepage = "https://getdnsapi.net";
+{ lib, stdenv, fetchurl, cmake, darwin, doxygen, libidn2, libyaml, openssl
+, systemd, unbound, yq }:
+let
+  metaCommon = with lib; {
     maintainers = with maintainers; [ leenaars ehmry ];
     license = licenses.bsd3;
     platforms = platforms.all;
   };
+in rec {
+
+  getdns = stdenv.mkDerivation rec {
+    pname = "getdns";
+    version = "1.7.0";
+    outputs = [ "out" "dev" "lib" "man" ];
+
+    src = fetchurl {
+      url = "https://getdnsapi.net/releases/${pname}-${
+          with builtins;
+          concatStringsSep "-" (splitVersion version)
+        }/${pname}-${version}.tar.gz";
+      sha256 = "sha256-6ocTzl4HesdrFBjOtq/SXm1OOelgD29egdOjoTpg9lI=";
+    };
+
+    nativeBuildInputs = [ cmake doxygen ];
+
+    buildInputs = [ libidn2 openssl unbound ];
+
+    postInstall = "rm -r $out/share/doc";
+
+    meta = with lib;
+      metaCommon // {
+        description = "A modern asynchronous DNS API";
+        longDescription = ''
+          getdns is an implementation of a modern asynchronous DNS API; the
+          specification was originally edited by Paul Hoffman. It is intended to make all
+          types of DNS information easily available to application developers and non-DNS
+          experts. DNSSEC offers a unique global infrastructure for establishing and
+          enhancing cryptographic trust relations. With the development of this API the
+          developers intend to offer application developers a modern and flexible
+          interface that enables end-to-end trust in the DNS architecture, and which will
+          inspire application developers to implement innovative security solutions in
+          their applications.
+        '';
+        homepage = "https://getdnsapi.net";
+      };
+  };
+
+  stubby = stdenv.mkDerivation rec {
+    pname = "stubby";
+    version = "0.4.0";
+    outputs = [ "out" "man" "stubbyExampleJson" ];
+
+    inherit (getdns) src;
+    sourceRoot = "${getdns.name}/stubby";
+
+    nativeBuildInputs = [ cmake doxygen yq ];
+
+    buildInputs = [ getdns libyaml openssl systemd ]
+      ++ lib.optionals stdenv.isDarwin [ darwin.Security ];
+
+    postInstall = ''
+      rm -r $out/share/doc
+      yq \
+        < $NIX_BUILD_TOP/$sourceRoot/stubby.yml.example \
+        > $stubbyExampleJson
+    '';
+
+    passthru.settingsExample = with builtins;
+      fromJSON (readFile stubby.stubbyExampleJson);
+
+    meta = with lib;
+      metaCommon // {
+        description = "A local DNS Privacy stub resolver (using DNS-over-TLS)";
+        longDescription = ''
+          Stubby is an application that acts as a local DNS Privacy stub
+          resolver (using RFC 7858, aka DNS-over-TLS). Stubby encrypts DNS
+          queries sent from a client machine (desktop or laptop) to a DNS
+          Privacy resolver increasing end user privacy. Stubby is developed by
+          the getdns team.
+        '';
+        homepage = "https://dnsprivacy.org/wiki/x/JYAT";
+      };
+  };
+
 }