Commit f3c45ddb authored by Adkins, Cameron's avatar Adkins, Cameron
Browse files

libcoro: disable networking on mingw target

parent b1613170
Loading
Loading
Loading
Loading
+14 −9
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchFromGitHub
, cmake
, openssl
, c-ares
{
  lib, stdenv, fetchFromGitHub,
  cmake,
  openssl, c-ares,
  enableNetworking ? !stdenv.targetPlatform.isMinGW
}:

stdenv.mkDerivation rec {
@@ -17,17 +16,23 @@ stdenv.mkDerivation rec {
    sha256 = "sha256-TZ6EOS7Oo7ICXbx+ceQ6ZX18bPPWNwHyGJuALsUzb4s=";
  };

  nativeBuildInputs = [
    cmake
  buildInputs = [
    openssl
    c-ares
  ];

  nativeBuildInputs = [
    cmake
  ];

  cmakeFlags = [
    "-DLIBCORO_EXTERNAL_DEPENDENCIES=ON"
    "-DLIBCORO_BUILD_SHARED_LIBS=ON"
    "-DLIBCORO_BUILD_EXAMPLES=OFF"
    "-DLIBCORO_BUILD_TESTS=OFF"
  ] ++ lib.optional (!enableNetworking) [
    "-DLIBCORO_FEATURE_NETWORKING=OFF"
    "-DLIBCORO_FEATURE_TLS=OFF"
  ];

  meta = {
@@ -40,6 +45,6 @@ stdenv.mkDerivation rec {
    homepage = "https://github.com/jbaldwin/libcoro";
    license = lib.licenses.asl20;
    maintainers = [ lib.maintainers.cadkin ];
    platforms = lib.platforms.linux;
    platforms = lib.platforms.all;
  };
}