Files
nixpkgs/pkgs/by-name/cp/cpp-netlib/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

55 lines
1.3 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
cmake,
boost186,
openssl,
llvmPackages_18,
}:
let
# std::char_traits has been removed
stdenvForCppNetlib = if stdenv.hostPlatform.isDarwin then llvmPackages_18.stdenv else stdenv;
in
stdenvForCppNetlib.mkDerivation rec {
pname = "cpp-netlib";
version = "0.13.0-final";
src = fetchFromGitHub {
owner = "cpp-netlib";
repo = "cpp-netlib";
tag = "cpp-netlib-${version}";
sha256 = "18782sz7aggsl66b4mmi1i0ijwa76iww337fi9sygnplz2hs03a3";
fetchSubmodules = true;
};
patches = [
# 'u32_to_u8_iterator' was not declared
./0001-Compatibility-with-boost-1.83.patch
];
nativeBuildInputs = [ cmake ];
buildInputs = [
# io_service.hpp has been removed in boost 1.87+
boost186
openssl
];
cmakeFlags = [
"-DCPP-NETLIB_BUILD_SHARED_LIBS=ON"
# fatal error: 'boost/asio/stream_socket_service.hpp' file not found
"-DCPP-NETLIB_BUILD_EXAMPLES=OFF"
"-DCPP-NETLIB_BUILD_TESTS=OFF"
];
# Most tests make network GET requests to various websites
doCheck = false;
meta = with lib; {
description = "Collection of open-source libraries for high level network programming";
homepage = "https://cpp-netlib.org";
license = licenses.boost;
platforms = platforms.all;
};
}