Unverified Commit 61f358e4 authored by Nick Cao's avatar Nick Cao
Browse files

pdns: use __structuredAttrs

parent 233bb8b0
Loading
Loading
Loading
Loading
+6 −8
Original line number Diff line number Diff line
@@ -69,17 +69,13 @@ stdenv.mkDerivation (finalAttrs: {
    (lib.withFeature true "libsodium")
    (lib.withFeature true "sqlite3")
    (lib.withFeatureAs true "libcrypto" (lib.getDev openssl))
    (lib.withFeatureAs true "modules" "")
    (lib.withFeatureAs true "dynmodules" (lib.concatStringsSep " " [
      "bind" "geoip" "gmysql" "godbc" "gpgsql" "gsqlite3" "ldap" "lmdb" "lua2" "pipe" "remote" "tinydns"
    ]))
    "sysconfdir=/etc/pdns"
  ];

  # nix destroy with-modules arguments, when using configureFlags
  preConfigure = ''
    configureFlagsArray+=(
      "--with-modules="
      "--with-dynmodules=bind geoip gmysql godbc gpgsql gsqlite3 ldap lmdb lua2 pipe remote tinydns"
    )
  '';

  # We want the various utilities to look for the powerdns config in
  # /etc/pdns, but to actually install the sample config file in
  # $out
@@ -92,6 +88,8 @@ stdenv.mkDerivation (finalAttrs: {
    nixos = nixosTests.powerdns;
  };

  __structuredAttrs = true;

  meta = with lib; {
    description = "Authoritative DNS server";
    homepage = "https://www.powerdns.com";