commit
e8f8e5829f
|
@ -7,11 +7,11 @@
|
|||
# Optional dependencies
|
||||
, enableApp ? with stdenv.hostPlatform; !isWindows && !isStatic
|
||||
, c-aresMinimal, libev, openssl, zlib
|
||||
, enableAsioLib ? false, boost
|
||||
, enableGetAssets ? false, libxml2
|
||||
, enableHpack ? false, jansson
|
||||
, enableHttp3 ? false, ngtcp2, nghttp3, quictls
|
||||
, enableJemalloc ? false, jemalloc
|
||||
, enablePython ? false, python3Packages, ncurses
|
||||
, enablePython ? false, python3, ncurses
|
||||
|
||||
# Unit tests ; we have to set TZDIR, which is a GNUism.
|
||||
, enableTests ? stdenv.hostPlatform.isGnu, cunit, tzdata
|
||||
|
@ -27,41 +27,38 @@
|
|||
|
||||
assert enableGetAssets -> enableApp;
|
||||
assert enableHpack -> enableApp;
|
||||
assert enableHttp3 -> enableApp;
|
||||
assert enableJemalloc -> enableApp;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "nghttp2";
|
||||
version = "1.51.0";
|
||||
version = "1.54.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/${pname}/${pname}/releases/download/v${version}/${pname}-${version}.tar.bz2";
|
||||
sha256 = "sha256-6z6m9bYMbT7b8GXgT0NOjtYpGlyxoHkZxBcwqx/MAOA=";
|
||||
sha256 = "sha256-nZ0esJm0kvr6Gtn31pZZU3WP3vmtDPZaTQvcI3OAPa0=";
|
||||
};
|
||||
|
||||
outputs = [ "bin" "out" "dev" "lib" ]
|
||||
++ lib.optionals (enablePython) [ "python" ];
|
||||
outputs = [ "out" "dev" "lib" "doc" "man" ];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ]
|
||||
++ lib.optionals (enableApp) [ installShellFiles ]
|
||||
++ lib.optionals (enablePython) [ python3Packages.cython ];
|
||||
++ lib.optionals (enableApp) [ installShellFiles ];
|
||||
|
||||
buildInputs = lib.optionals enableApp [ c-aresMinimal libev openssl zlib ]
|
||||
++ lib.optionals (enableAsioLib) [ boost ]
|
||||
buildInputs = lib.optionals enableApp [ c-aresMinimal libev zlib ]
|
||||
++ lib.optionals (enableApp && !enableHttp3) [ openssl ]
|
||||
++ lib.optionals (enableGetAssets) [ libxml2 ]
|
||||
++ lib.optionals (enableHpack) [ jansson ]
|
||||
++ lib.optionals (enableJemalloc) [ jemalloc ]
|
||||
++ lib.optionals (enablePython) [ python3Packages.python ncurses python3Packages.setuptools ];
|
||||
++ lib.optionals (enableHttp3) [ ngtcp2 nghttp3 quictls ]
|
||||
++ lib.optionals (enablePython) [ python3 ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
configureFlags = [
|
||||
"--disable-examples"
|
||||
(lib.enableFeature enableApp "app")
|
||||
] ++ lib.optionals (enableAsioLib) [ "--enable-asio-lib" "--with-boost-libdir=${boost}/lib" ]
|
||||
++ lib.optionals (enablePython) [
|
||||
"--enable-python-bindings"
|
||||
"--with-cython=${python3Packages.cython}/bin/cython"
|
||||
];
|
||||
(lib.enableFeature enableHttp3 "http3")
|
||||
];
|
||||
|
||||
# Unit tests require CUnit and setting TZDIR environment variable
|
||||
doCheck = enableTests;
|
||||
|
@ -70,22 +67,18 @@ stdenv.mkDerivation rec {
|
|||
export TZDIR=${tzdata}/share/zoneinfo
|
||||
'';
|
||||
|
||||
preInstall = lib.optionalString (enablePython) ''
|
||||
mkdir -p $out/${python3Packages.python.sitePackages}
|
||||
# convince installer it's ok to install here
|
||||
export PYTHONPATH="$PYTHONPATH:$out/${python3Packages.python.sitePackages}"
|
||||
'';
|
||||
postInstall = lib.optionalString (enablePython) ''
|
||||
mkdir -p $python/${python3Packages.python.sitePackages}
|
||||
mv $out/${python3Packages.python.sitePackages}/* $python/${python3Packages.python.sitePackages}
|
||||
rm -r $out/lib
|
||||
'' + lib.optionalString (enableApp) ''
|
||||
postInstall = lib.optionalString (enableApp) ''
|
||||
installShellCompletion --bash doc/bash_completion/{h2load,nghttp,nghttpd,nghttpx}
|
||||
'' + lib.optionalString (!enableApp) ''
|
||||
rm -r $out/bin
|
||||
'' + lib.optionalString (enablePython) ''
|
||||
patchShebangs $out/share/nghttp2
|
||||
'' + lib.optionalString (!enablePython) ''
|
||||
rm -r $out/share
|
||||
'';
|
||||
|
||||
passthru.tests = {
|
||||
inherit curl libsoup;
|
||||
python-nghttp2 = python3Packages.nghttp2;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
|
|
|
@ -202,6 +202,7 @@ mapAliases ({
|
|||
mox = throw "mox was removed because it is unmaintained"; # added 2023-02-21
|
||||
mutmut = throw "mutmut has been promoted to a top-level attribute"; # added 2022-10-02
|
||||
net2grid = gridnet; # add 2022-04-22
|
||||
nghttp2 = throw "in 1.52.0 removed deprecated python bindings."; # added 2023-06-08
|
||||
nose-cover3 = throw "nose-cover3 has been removed, it was using setuptools 2to3 translation feature, which has been removed in setuptools 58"; # added 2022-02-16
|
||||
nose_progressive = throw "nose_progressive has been removed, it was using setuptools 2to3 translation feature, which has been removed in setuptools 58"; #added 2023-02-21
|
||||
notifymuch = throw "notifymuch has been promoted to a top-level attribute"; # added 2022-10-02
|
||||
|
|
|
@ -6986,13 +6986,6 @@ self: super: with self; {
|
|||
withPython = true;
|
||||
});
|
||||
|
||||
nghttp2 = (toPythonModule (pkgs.nghttp2.override {
|
||||
python3Packages = self;
|
||||
inherit (pkgs) ncurses;
|
||||
enableApp = false; # build only libnghttp2 ...
|
||||
enablePython = true; # ... and its Python bindings
|
||||
})).python;
|
||||
|
||||
nh3 = callPackage ../development/python-modules/nh3 { };
|
||||
|
||||
niaaml = callPackage ../development/python-modules/niaaml { };
|
||||
|
|
Loading…
Reference in New Issue
Block a user