Unverified Commit 0b3959c4 authored by Nick Cao's avatar Nick Cao
Browse files

pdns: format with nixfmt

parent 61f358e4
Loading
Loading
Loading
Loading
+49 −29
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: {
@@ -53,10 +54,12 @@ stdenv.mkDerivation (finalAttrs: {
  ];

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

  configureFlags = [
    (lib.enableFeature false "silent-rules")
@@ -70,9 +73,22 @@ stdenv.mkDerivation (finalAttrs: {
    (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"
    ]))
    (lib.withFeatureAs true "dynmodules" (
      lib.concatStringsSep " " [
        "bind"
        "geoip"
        "gmysql"
        "godbc"
        "gpgsql"
        "gsqlite3"
        "ldap"
        "lmdb"
        "lua2"
        "pipe"
        "remote"
        "tinydns"
      ]
    ))
    "sysconfdir=/etc/pdns"
  ];

@@ -96,6 +112,10 @@ stdenv.mkDerivation (finalAttrs: {
    platforms = platforms.unix;
    broken = stdenv.hostPlatform.isDarwin;
    license = licenses.gpl2Only;
    maintainers = with maintainers; [ mic92 disassembler nickcao ];
    maintainers = with maintainers; [
      mic92
      disassembler
      nickcao
    ];
  };
})