16 stdenv.mkDerivation (finalAttrs: {
20 src = fetchFromGitHub {
23 rev = "v${finalAttrs.version}";
24 hash = "sha256-Bc9bVZ2pDsG118l/SlElZpgh9F1JEgPF8LzBX7d4mhE=";
27 cargoDeps = rustPlatform.fetchCargoTarball {
29 name = "${finalAttrs.pname}-${finalAttrs.version}";
30 hash = "sha256-gDQ9AFrJuV7SrzKCAHQBkKj6clXuPLO0DHhnvcBqRLs=";
33 propagatedBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv darwin.apple_sdk.frameworks.Security ];
35 nativeBuildInputs = [ cargo rustPlatform.cargoSetupHook cargo-c validatePkgConfig ];
39 ${rust.envVars.setEnv} cargo cbuild -j $NIX_BUILD_CORES --release --frozen --prefix=${placeholder "out"} --target ${stdenv.hostPlatform.rust.rustcTarget}
45 ${rust.envVars.setEnv} cargo cinstall -j $NIX_BUILD_CORES --release --frozen --prefix=${placeholder "out"} --target ${stdenv.hostPlatform.rust.rustcTarget}
51 ${rust.envVars.setEnv} cargo ctest -j $NIX_BUILD_CORES --release --frozen --prefix=${placeholder "out"} --target ${stdenv.hostPlatform.rust.rustcTarget}
56 curl = curl.override { opensslSupport = false; rustlsSupport = true; rustls-ffi = finalAttrs.finalPackage; };
57 apacheHttpd = apacheHttpd.override { modTlsSupport = true; rustls-ffi = finalAttrs.finalPackage; };
58 pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
62 description = "C-to-rustls bindings";
63 homepage = "https://github.com/rustls/rustls-ffi/";
64 pkgConfigModules = [ "rustls" ];
65 license = with lib.licenses; [ mit asl20 isc ];
66 maintainers = [ maintainers.lesuisse ];