nixpkgs-overlay/pkgs/picotls/default.nix

50 lines
953 B
Nix
Raw Normal View History

2020-10-27 21:45:46 +01:00
{ stdenv
, cmake
, brotli
, openssl
, pkgconfig
, fetchFromGitHub
}:
stdenv.mkDerivation rec {
pname = "picotls";
version = "20201012";
src = fetchFromGitHub {
owner = "h2o";
repo = "picotls";
rev = "9238121fa7788e8642072b6d4d1a2f2fb71db242";
sha256 = "01hl9s2jxh792kfzhc12ha9x1wwk9g869k6n4m83cccdnkmghg8j";
};
outputs = [ "out" "dev" ];
nativeBuildInputs = [
cmake
pkgconfig
brotli
];
buildInputs = [
openssl
];
installPhase = ''
runHook preInstall
install -Dt $out/lib *.a
install -Dt $dev/include ../include/*.h
install -Dt $dev/include/picotls ../include/picotls/*.h
runHook postInstall
'';
meta = with stdenv.lib; {
description = "Picotls is a TLS 1.3 (RFC 8446) protocol stack written in C";
homepage = https://github.com/h2o/picotls;
license = licenses.mit;
maintainers = with maintainers; [ royneary ];
platforms = platforms.linux;
};
}