about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/dns/pdns-recursor/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/servers/dns/pdns-recursor/default.nix')
-rw-r--r--nixpkgs/pkgs/servers/dns/pdns-recursor/default.nix32
1 files changed, 26 insertions, 6 deletions
diff --git a/nixpkgs/pkgs/servers/dns/pdns-recursor/default.nix b/nixpkgs/pkgs/servers/dns/pdns-recursor/default.nix
index 5ff385cf65ac..e691336d52a9 100644
--- a/nixpkgs/pkgs/servers/dns/pdns-recursor/default.nix
+++ b/nixpkgs/pkgs/servers/dns/pdns-recursor/default.nix
@@ -1,26 +1,46 @@
 { lib, stdenv, fetchurl, pkg-config, boost, nixosTests
 , openssl, systemd, lua, luajit, protobuf
+, libsodium
+, curl
+, rustPlatform, cargo, rustc
 , enableProtoBuf ? false
 }:
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (finalAttrs: {
   pname = "pdns-recursor";
-  version = "4.9.2";
+  version = "5.0.2";
 
   src = fetchurl {
-    url = "https://downloads.powerdns.com/releases/pdns-recursor-${version}.tar.bz2";
-    sha256 = "sha256-TLgYBFjs+1KKPZo0uihEts0u1pyhxGHd4koOvWaCkUQ=";
+    url = "https://downloads.powerdns.com/releases/pdns-recursor-${finalAttrs.version}.tar.bz2";
+    hash = "sha256-qQ6LYf3BgbWWFEw1kgEYynHDuV9GZYzOfoIidQ3kXKk=";
   };
 
-  nativeBuildInputs = [ pkg-config ];
+  cargoDeps = rustPlatform.fetchCargoTarball {
+    inherit (finalAttrs) src;
+    sourceRoot = "pdns-recursor-${finalAttrs.version}/settings/rust";
+    hash = "sha256-XHzuYkO91TJNU2DYqMlafqrc2zR1WvIrNLjFHL2FcwA=";
+  };
+
+  cargoRoot = "settings/rust";
+
+  nativeBuildInputs = [
+    cargo
+    rustc
+
+    rustPlatform.cargoSetupHook
+    pkg-config
+  ];
   buildInputs = [
     boost openssl systemd
     lua luajit
+    libsodium
+    curl
   ] ++ lib.optional enableProtoBuf protobuf;
 
   configureFlags = [
     "--enable-reproducible"
     "--enable-systemd"
+    "--enable-dns-over-tls"
     "sysconfdir=/etc/pdns-recursor"
   ];
 
@@ -42,4 +62,4 @@ stdenv.mkDerivation rec {
     license = licenses.gpl2Only;
     maintainers = with maintainers; [ rnhmjoj ];
   };
-}
+})