b6f2ab0a42
GitOrigin-RevId: 253aecf69ed7595aaefabde779aa6449195bebb7
39 lines
1 KiB
Nix
39 lines
1 KiB
Nix
{ lib, stdenv, fetchFromGitHub, cmake, openssl }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "s2n-tls";
|
|
version = "1.0.16";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "aws";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-gF4VhNEq/gpxXqOKvBtWZ5iZ3Jf98vSuSZYUu8r1jKA=";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
outputs = [ "out" "dev"];
|
|
|
|
buildInputs = [ openssl ]; # s2n-config has find_dependency(LibCrypto).
|
|
|
|
cmakeFlags = [
|
|
"-DBUILD_SHARED_LIBS=ON"
|
|
"-DCMAKE_SKIP_BUILD_RPATH=OFF"
|
|
];
|
|
|
|
propagatedBuildInputs = [ openssl ]; # s2n-config has find_dependency(LibCrypto).
|
|
|
|
postInstall = ''
|
|
substituteInPlace $out/lib/s2n/cmake/shared/s2n-targets.cmake \
|
|
--replace 'INTERFACE_INCLUDE_DIRECTORIES "''${_IMPORT_PREFIX}/include"' 'INTERFACE_INCLUDE_DIRECTORIES ""'
|
|
'';
|
|
|
|
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 ];
|
|
};
|
|
}
|