Unverified Commit 920ead1e authored by Masum Reza's avatar Masum Reza Committed by GitHub
Browse files

pdns: 4.9.1 -> 4.9.2 (#345153)

parents 30059f17 fcde12ca
Loading
Loading
Loading
Loading
+59 −48
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchurl
, pkg-config
, nixosTests
, boost
, yaml-cpp
, libsodium
, sqlite
, protobuf
, openssl
, systemd
, mariadb-connector-c
, postgresql
, lua
, openldap
, geoip
, curl
, unixODBC
, lmdb
, tinycdb
{
  lib,
  stdenv,
  fetchurl,
  pkg-config,
  nixosTests,
  boost,
  yaml-cpp,
  libsodium,
  sqlite,
  protobuf,
  openssl,
  systemd,
  mariadb-connector-c,
  postgresql,
  lua,
  openldap,
  geoip,
  curl,
  unixODBC,
  lmdb,
  tinycdb,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "pdns";
  version = "4.9.1";
  version = "4.9.2";

  src = fetchurl {
    url = "https://downloads.powerdns.com/releases/pdns-${finalAttrs.version}.tar.bz2";
    hash = "sha256-MNlnG48IR3Tby6IPWlOjE00IIqsu3D75aNoDDmMN0Jo=";
    hash = "sha256-9XBkBCcEH0xcVHDRbv+VGnA4w1PdxGGydQKQzpmy48I=";
  };
  # redact configure flags from version output to reduce closure size
  patches = [ ./version.patch ];
@@ -52,34 +53,38 @@ stdenv.mkDerivation (finalAttrs: {
    tinycdb
  ];

  # Configure phase requires 64-bit time_t even on 32-bit platforms.
  env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.hostPlatform.is32bit [
    "-D_TIME_BITS=64"
    "-D_FILE_OFFSET_BITS=64"
  ]);

  configureFlags = [
    "--disable-silent-rules"
    "--enable-dns-over-tls"
    "--enable-unit-tests"
    "--enable-reproducible"
    "--enable-tools"
    "--enable-ixfrdist"
    "--enable-systemd"
    "--with-libsodium"
    "--with-sqlite3"
    "--with-libcrypto=${openssl.dev}"
    (lib.enableFeature stdenv.hostPlatform.is32bit "experimental-64bit-time_t-support-on-glibc")
    (lib.enableFeature false "silent-rules")
    (lib.enableFeature true "dns-over-tls")
    (lib.enableFeature true "unit-tests")
    (lib.enableFeature true "reproducible")
    (lib.enableFeature true "tools")
    (lib.enableFeature true "ixfrdist")
    (lib.enableFeature true "systemd")
    (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,12 +97,18 @@ stdenv.mkDerivation (finalAttrs: {
    nixos = nixosTests.powerdns;
  };

  __structuredAttrs = true;

  meta = with lib; {
    description = "Authoritative DNS server";
    homepage = "https://www.powerdns.com";
    platforms = platforms.unix;
    broken = stdenv.hostPlatform.isDarwin;
    license = licenses.gpl2Only;
    maintainers = with maintainers; [ mic92 disassembler nickcao ];
    maintainers = with maintainers; [
      mic92
      disassembler
      nickcao
    ];
  };
})