@@ -198,11 +198,33 @@ in {
198198 ./1.1/nix-ssl-cert-file.patch
199199
200200 (if stdenv.hostPlatform.isDarwin
201− then ./1.1/use-etc-ssl-certs-darwin.patch
202− else ./1.1/use-etc-ssl-certs.patch)
201+ then ./use-etc-ssl-certs-darwin.patch
202+ else ./use-etc-ssl-certs.patch)
203203 ] ++ lib.optionals (stdenv.isDarwin) [
204204 ./1.1/macos-yosemite-compat.patch
205205 ];
206206 withDocs = true;
207207 };
208+
209+ openssl_3_0 = common {
210+ version = "3.0.0";
211+ sha256 = "sha256-We7fy0bCUhTJvTftYHgpe03wHQEiZ/6enu4x9hvHBTY=";
212+ patches = [
213+ ./3.0/nix-ssl-cert-file.patch
214+
215+ # openssl will only compile in KTLS if the current kernel supports it.
216+ # This patch disables build-time detection.
217+ ./3.0/openssl-disable-kernel-detection.patch
218+
219+ (if stdenv.hostPlatform.isDarwin
220+ then ./use-etc-ssl-certs-darwin.patch
221+ else ./use-etc-ssl-certs.patch)
222+ ];
223+
224+ withDocs = true;
225+
226+ extraMeta = with lib; {
227+ license = licenses.asl20;
228+ };
229+ };
208230}