Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 cmake, 6 boost186, 7 openssl, 8 llvmPackages_18, 9}: 10let 11 # std::char_traits has been removed 12 stdenvForCppNetlib = if stdenv.hostPlatform.isDarwin then llvmPackages_18.stdenv else stdenv; 13in 14stdenvForCppNetlib.mkDerivation rec { 15 pname = "cpp-netlib"; 16 version = "0.13.0-final"; 17 18 src = fetchFromGitHub { 19 owner = "cpp-netlib"; 20 repo = "cpp-netlib"; 21 rev = "cpp-netlib-${version}"; 22 sha256 = "18782sz7aggsl66b4mmi1i0ijwa76iww337fi9sygnplz2hs03a3"; 23 fetchSubmodules = true; 24 }; 25 26 patches = [ 27 # 'u32_to_u8_iterator' was not declared 28 ./0001-Compatibility-with-boost-1.83.patch 29 ]; 30 31 nativeBuildInputs = [ cmake ]; 32 buildInputs = [ 33 # io_service.hpp has been removed in boost 1.87+ 34 boost186 35 openssl 36 ]; 37 38 cmakeFlags = [ 39 "-DCPP-NETLIB_BUILD_SHARED_LIBS=ON" 40 # fatal error: 'boost/asio/stream_socket_service.hpp' file not found 41 "-DCPP-NETLIB_BUILD_EXAMPLES=OFF" 42 "-DCPP-NETLIB_BUILD_TESTS=OFF" 43 ]; 44 45 # Most tests make network GET requests to various websites 46 doCheck = false; 47 48 meta = with lib; { 49 description = "Collection of open-source libraries for high level network programming"; 50 homepage = "https://cpp-netlib.org"; 51 license = licenses.boost; 52 platforms = platforms.all; 53 }; 54}