9 stdenv.mkDerivation rec {
13 src = fetchFromGitHub {
17 hash = "sha256-VS/85qu0Dc3HSeD0DYm2f4ur+ZRPhb1Srf7BeK7Pdfk=";
20 nativeBuildInputs = [ cmake ];
22 outputs = [ "out" "dev" ];
24 buildInputs = [ openssl ]; # s2n-config has find_dependency(LibCrypto).
27 "-DBUILD_SHARED_LIBS=ON"
28 "-DUNSAFE_TREAT_WARNINGS_AS_ERRORS=OFF" # disable -Werror
29 ] ++ lib.optionals stdenv.hostPlatform.isMips64 [
30 # See https://github.com/aws/s2n-tls/issues/1592 and https://github.com/aws/s2n-tls/pull/1609
34 propagatedBuildInputs = [ openssl ]; # s2n-config has find_dependency(LibCrypto).
37 # Glob for 'shared' or 'static' subdir
38 for f in $out/lib/s2n/cmake/*/s2n-targets.cmake; do
39 substituteInPlace "$f" \
40 --replace 'INTERFACE_INCLUDE_DIRECTORIES "''${_IMPORT_PREFIX}/include"' 'INTERFACE_INCLUDE_DIRECTORIES ""'
49 description = "C99 implementation of the TLS/SSL protocols";
50 homepage = "https://github.com/aws/s2n-tls";
51 license = licenses.asl20;
52 platforms = platforms.unix;
53 maintainers = with maintainers; [ orivej ];