Commit a9e897c9 authored by Elliot Cameron's avatar Elliot Cameron
Browse files

libevent: add static build option

parent d1e7e929
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
{ lib, stdenv, fetchurl, findutils, fixDarwinDylibNames
, sslSupport ? true, openssl
, fetchpatch

, static ? stdenv.hostPlatform.isStatic
}:

stdenv.mkDerivation rec {
@@ -20,7 +22,10 @@ stdenv.mkDerivation rec {
    })
  ];

  configureFlags = lib.optional (!sslSupport) "--disable-openssl";
  configureFlags = lib.flatten [
    (lib.optional (!sslSupport) "--disable-openssl")
    (lib.optionals static ["--disable-shared" "--with-pic"])
  ];

  preConfigure = lib.optionalString (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") ''
    MACOSX_DEPLOYMENT_TARGET=10.16