at 23.11-beta 40 lines 1.0 kB view raw
1{ lib, stdenv, fetchFromGitHub, rustPlatform, Security, apacheHttpd, curl }: 2 3rustPlatform.buildRustPackage rec { 4 pname = "rustls-ffi"; 5 version = "0.10.0"; 6 7 src = fetchFromGitHub { 8 owner = "rustls"; 9 repo = pname; 10 rev = "v${version}"; 11 hash = "sha256-IDIWN5g1aaE6SDdXSm4WYK6n+BpuypPYQITuDj1WJEc="; 12 }; 13 14 propagatedBuildInputs = lib.optionals stdenv.isDarwin [ Security ]; 15 16 cargoLock.lockFile = ./Cargo.lock; 17 postPatch = '' 18 cp ${./Cargo.lock} Cargo.lock 19 ''; 20 21 installPhase = '' 22 runHook preInstall 23 24 make install DESTDIR=${placeholder "out"} 25 26 runHook postInstall 27 ''; 28 29 passthru.tests = { 30 apacheHttpd = apacheHttpd.override { modTlsSupport = true; }; 31 curl = curl.override { opensslSupport = false; rustlsSupport = true; }; 32 }; 33 34 meta = with lib; { 35 description = "C-to-rustls bindings"; 36 homepage = "https://github.com/rustls/rustls-ffi/"; 37 license = with lib.licenses; [ mit asl20 isc ]; 38 maintainers = [ maintainers.lesuisse ]; 39 }; 40}