nixpkgs/pkgs/development/libraries/rustls-ffi/default.nix
Thomas Gerbet ce5b2e3773 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.
2023-03-28 18:00:35 +02:00

40 lines
920 B
Nix

{ lib, stdenv, fetchFromGitHub, rustPlatform, Security, apacheHttpd }:
rustPlatform.buildRustPackage rec {
pname = "rustls-ffi";
version = "0.9.2";
src = fetchFromGitHub {
owner = "rustls";
repo = pname;
rev = "v${version}";
hash = "sha256-urDC/Tm+ZwEbf0orZzKSET5ljQGVcKPGxscctKOM/FU=";
};
propagatedBuildInputs = lib.optionals stdenv.isDarwin [ Security ];
cargoLock.lockFile = ./Cargo.lock;
postPatch = ''
cp ${./Cargo.lock} Cargo.lock
'';
installPhase = ''
runHook preInstall
make install DESTDIR=${placeholder "out"}
runHook postInstall
'';
passthru.tests = {
apacheHttpd = apacheHttpd.override { modTlsSupport = true; };
};
meta = with lib; {
description = "C-to-rustls bindings";
homepage = "https://github.com/rustls/rustls-ffi/";
license = with lib.licenses; [ mit asl20 isc ];
maintainers = [ maintainers.lesuisse ];
};
}