From 2fce8dda39c1877acf02b018ae3513ad5014f706 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Tue, 14 Feb 2017 00:47:01 +0100 Subject: [PATCH] knot-dns: fixup Darwin build again, hopefully --- pkgs/servers/dns/knot-dns/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/servers/dns/knot-dns/default.nix b/pkgs/servers/dns/knot-dns/default.nix index af7d4d4c48ca..94d5ee9f5c71 100644 --- a/pkgs/servers/dns/knot-dns/default.nix +++ b/pkgs/servers/dns/knot-dns/default.nix @@ -2,6 +2,8 @@ , systemd, nettle, libedit, zlib, libiconv, fetchpatch }: +with { inherit (stdenv.lib) optional optionals; }; + # Note: ATM only the libraries have been tested in nixpkgs. stdenv.mkDerivation rec { name = "knot-dns-${version}"; @@ -16,16 +18,17 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig ]; buildInputs = [ - gnutls jansson liburcu libidn lmdb + gnutls jansson liburcu libidn nettle libedit libiconv # without sphinx &al. for developer documentation ] # Use embedded lmdb there for now, as detection is broken on Darwin somehow. - ++ stdenv.lib.optionals stdenv.isLinux [ libcap_ng systemd ] - ++ stdenv.lib.optional stdenv.isDarwin zlib; # perhaps due to gnutls + ++ optionals stdenv.isLinux [ libcap_ng systemd lmdb ] + ++ optional stdenv.isDarwin zlib; # perhaps due to gnutls - configureFlags = [ "--with-lmdb=${stdenv.lib.getLib lmdb}"/*not perfect*/ ]; + # Not ideal but seems to work on Linux. + configureFlags = optional stdenv.isLinux "--with-lmdb=${stdenv.lib.getLib lmdb}"; enableParallelBuilding = true;