2018-02-14 21:01:13 +01:00
|
|
|
{ stdenv, fetchFromGitHub
|
|
|
|
, pkgconfig, cmake
|
2018-08-09 01:47:30 +02:00
|
|
|
, libressl, libuv, zlib
|
2018-02-14 21:01:13 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
with builtins;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "h2o";
|
2019-08-19 11:10:02 +02:00
|
|
|
version = "2.2.6";
|
2018-02-14 21:01:13 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "h2o";
|
|
|
|
repo = "h2o";
|
|
|
|
rev = "refs/tags/v${version}";
|
2019-08-19 11:10:02 +02:00
|
|
|
sha256 = "0qni676wqvxx0sl0pw9j0ph7zf2krrzqc1zwj73mgpdnsr8rsib7";
|
2018-02-14 21:01:13 +01:00
|
|
|
};
|
|
|
|
|
2018-08-09 01:47:30 +02:00
|
|
|
# We have to fix up some function prototypes, because despite upstream h2o
|
|
|
|
# issue #1705 (https://github.com/h2o/h2o/issues/1706), libressl 2.7+ doesn't
|
|
|
|
# seem to work
|
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace ./deps/neverbleed/neverbleed.c \
|
|
|
|
--replace 'static void RSA_' 'void RSA_' \
|
|
|
|
--replace 'static int RSA_' 'int RSA_'
|
|
|
|
'';
|
|
|
|
|
2018-02-14 21:01:13 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig cmake ];
|
2018-08-09 01:47:30 +02:00
|
|
|
buildInputs = [ libressl libuv zlib ];
|
2018-02-14 21:01:13 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Optimized HTTP/1 and HTTP/2 server";
|
|
|
|
homepage = https://h2o.examp1e.net;
|
|
|
|
license = stdenv.lib.licenses.mit;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|