about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/cpp-netlib/default.nix
blob: af57944a453d6beb5a11f7241d9cbd2c32b697fe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ lib, stdenv, fetchFromGitHub, cmake, boost, openssl }:

stdenv.mkDerivation rec {
  pname = "cpp-netlib";
  version = "0.13.0-final";

  src = fetchFromGitHub {
    owner = pname;
    repo = pname;
    rev = "${pname}-${version}";
    sha256 = "18782sz7aggsl66b4mmi1i0ijwa76iww337fi9sygnplz2hs03a3";
    fetchSubmodules = true;
  };

  nativeBuildInputs = [ cmake ];
  buildInputs = [ boost 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;
  };
}