7a3b6ff951
* s2n-tls: 1.3.0 -> 1.3.1 (#151273) * s2n-tls: 1.3.1 -> 1.3.4 Co-authored-by: Renaud <c0bw3b@users.noreply.github.com>
48 lines
1.2 KiB
Nix
48 lines
1.2 KiB
Nix
{ lib, stdenv
|
|
, fetchFromGitHub
|
|
, cmake
|
|
, openssl
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "s2n-tls";
|
|
version = "1.3.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "aws";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-/kZI/NOZO8T5jlG9Qtfr14aCJDKrP7wEQLgJ6qe9VzY=";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
outputs = [ "out" "dev"];
|
|
|
|
buildInputs = [ openssl ]; # s2n-config has find_dependency(LibCrypto).
|
|
|
|
cmakeFlags = [
|
|
"-DBUILD_SHARED_LIBS=ON"
|
|
"-DCMAKE_SKIP_BUILD_RPATH=OFF"
|
|
"-DUNSAFE_TREAT_WARNINGS_AS_ERRORS=OFF" # disable -Werror
|
|
];
|
|
|
|
propagatedBuildInputs = [ openssl ]; # s2n-config has find_dependency(LibCrypto).
|
|
|
|
postInstall = ''
|
|
# Glob for 'shared' or 'static' subdir
|
|
for f in $out/lib/s2n/cmake/*/s2n-targets.cmake; do
|
|
substituteInPlace "$f" \
|
|
--replace 'INTERFACE_INCLUDE_DIRECTORIES "''${_IMPORT_PREFIX}/include"' 'INTERFACE_INCLUDE_DIRECTORIES ""'
|
|
done
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "C99 implementation of the TLS/SSL protocols";
|
|
homepage = "https://github.com/aws/s2n-tls";
|
|
license = licenses.asl20;
|
|
platforms = platforms.unix;
|
|
maintainers = with maintainers; [ orivej ];
|
|
};
|
|
}
|