pdns: use finalAttrs pattern and reformat

This commit is contained in:
Nick Cao 2023-06-02 10:18:05 +08:00
parent 43f437088c
commit c0bf0c5420
No known key found for this signature in database

View File

@ -1,14 +1,32 @@
{ 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 rec {
stdenv.mkDerivation (finalAttrs: {
pname = "pdns";
version = "4.8.0";
src = fetchurl {
url = "https://downloads.powerdns.com/releases/pdns-${version}.tar.bz2";
url = "https://downloads.powerdns.com/releases/pdns-${finalAttrs.version}.tar.bz2";
hash = "sha256-YalruviwykmpIloiVLlEPE/44FDTN0N9ha9N6InhASc=";
};
# redact configure flags from version output to reduce closure size
@ -16,13 +34,28 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkg-config ];
buildInputs = [
boost mariadb-connector-c postgresql lua openldap sqlite protobuf geoip
yaml-cpp libsodium curl unixODBC openssl systemd lmdb tinycdb
boost
mariadb-connector-c
postgresql
lua
openldap
sqlite
protobuf
geoip
yaml-cpp
libsodium
curl
unixODBC
openssl
systemd
lmdb
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"
"-D_TIME_BITS=64"
"-D_FILE_OFFSET_BITS=64"
]);
configureFlags = [
@ -61,4 +94,4 @@ stdenv.mkDerivation rec {
license = licenses.gpl2;
maintainers = with maintainers; [ mic92 disassembler nickcao ];
};
}
})