diff --git a/pkgs/servers/http/apache-httpd/2.4.nix b/pkgs/servers/http/apache-httpd/2.4.nix index 762aa9a757dc..0fdcd9c680ab 100644 --- a/pkgs/servers/http/apache-httpd/2.4.nix +++ b/pkgs/servers/http/apache-httpd/2.4.nix @@ -86,7 +86,9 @@ stdenv.mkDerivation rec { ''; # Required for ‘pthread_cancel’. - NIX_LDFLAGS = lib.optionalString (!stdenv.hostPlatform.isDarwin) "-lgcc_s"; + env = lib.optionalAttrs (!stdenv.hostPlatform.isDarwin) { + NIX_LDFLAGS = "-lgcc_s"; + }; configureFlags = [ "--with-apr=${apr.dev}"