Commit ce5b2e37 authored by Thomas Gerbet's avatar Thomas Gerbet
Browse files

apacheHttpd: add option to build experimental mod_tls

https://httpd.apache.org/docs/2.4/mod/mod_tls.html

Note: the attribute has been named `modTlsSupport` instead of
`tlsSupport` to try to limit the confusion with the existing
`sslSupport` attribute.
parent f757e6cc
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
{ lib, stdenv, fetchFromGitHub, rustPlatform, Security }:
{ lib, stdenv, fetchFromGitHub, rustPlatform, Security, apacheHttpd }:

rustPlatform.buildRustPackage rec {
  pname = "rustls-ffi";
@@ -26,6 +26,10 @@ rustPlatform.buildRustPackage rec {
    runHook postInstall
  '';

  passthru.tests = {
    apacheHttpd = apacheHttpd.override { modTlsSupport = true; };
  };

  meta = with lib; {
    description = "C-to-rustls bindings";
    homepage = "https://github.com/rustls/rustls-ffi/";
+4 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
, nixosTests
, proxySupport ? true
, sslSupport ? true, openssl
, modTlsSupport ? false, rustls-ffi, Foundation
, http2Support ? true, nghttp2
, ldapSupport ? true, openldap
, libxml2Support ? true, libxml2
@@ -27,6 +28,8 @@ stdenv.mkDerivation rec {
  buildInputs = [ perl libxcrypt ] ++
    lib.optional brotliSupport brotli ++
    lib.optional sslSupport openssl ++
    lib.optional modTlsSupport rustls-ffi ++
    lib.optional (modTlsSupport && stdenv.isDarwin) Foundation ++
    lib.optional ldapSupport openldap ++    # there is no --with-ldap flag
    lib.optional libxml2Support libxml2 ++
    lib.optional http2Support nghttp2 ++
@@ -55,6 +58,7 @@ stdenv.mkDerivation rec {
    "--includedir=${placeholder "dev"}/include"
    (lib.enableFeature proxySupport "proxy")
    (lib.enableFeature sslSupport "ssl")
    (lib.enableFeature modTlsSupport "tls")
    (lib.withFeatureAs libxml2Support "libxml2" "${libxml2.dev}/include/libxml2")
    "--docdir=$(doc)/share/doc"

+3 −1
Original line number Diff line number Diff line
@@ -24544,7 +24544,9 @@ with pkgs;
  apache-directory-server = callPackage ../servers/ldap/apache-directory-server { };
  apacheHttpd_2_4 = callPackage ../servers/http/apache-httpd/2.4.nix { };
  apacheHttpd_2_4 = callPackage ../servers/http/apache-httpd/2.4.nix {
    inherit (darwin.apple_sdk.frameworks) Foundation;
  };
  apacheHttpd = apacheHttpd_2_4;
  apacheHttpdPackagesFor = apacheHttpd: self: let callPackage = newScope self; in {