diff options
author | Aneesh Agrawal <aneeshusa@gmail.com> | 2017-08-20 13:34:16 -0700 |
---|---|---|
committer | Aneesh Agrawal <aneeshusa@gmail.com> | 2017-09-18 09:21:54 -0700 |
commit | 42a8ac1b711ea4a371811f1c935e7203ddae32b5 (patch) | |
tree | a6ae7f3847ca4e5815bedfaa11d6b024afa74702 /pkgs/development/libraries/libevent | |
parent | 018a5ae2f4e01c0e7ccd63a58c308082387fc73b (diff) | |
download | nixlib-42a8ac1b711ea4a371811f1c935e7203ddae32b5.tar nixlib-42a8ac1b711ea4a371811f1c935e7203ddae32b5.tar.gz nixlib-42a8ac1b711ea4a371811f1c935e7203ddae32b5.tar.bz2 nixlib-42a8ac1b711ea4a371811f1c935e7203ddae32b5.tar.lz nixlib-42a8ac1b711ea4a371811f1c935e7203ddae32b5.tar.xz nixlib-42a8ac1b711ea4a371811f1c935e7203ddae32b5.tar.zst nixlib-42a8ac1b711ea4a371811f1c935e7203ddae32b5.zip |
libevent: Make OpenSSL dependency optional
Diffstat (limited to 'pkgs/development/libraries/libevent')
-rw-r--r-- | pkgs/development/libraries/libevent/default.nix | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/pkgs/development/libraries/libevent/default.nix b/pkgs/development/libraries/libevent/default.nix index 6fa0caa97e91..e14f4cbf5d63 100644 --- a/pkgs/development/libraries/libevent/default.nix +++ b/pkgs/development/libraries/libevent/default.nix @@ -1,4 +1,8 @@ -{ stdenv, fetchurl, openssl, findutils }: +{ stdenv, fetchurl, findutils +, sslSupport? true, openssl +}: + +assert sslSupport -> openssl != null; stdenv.mkDerivation rec { name = "libevent-${version}"; @@ -11,13 +15,20 @@ stdenv.mkDerivation rec { # libevent_openssl is moved into its own output, so that openssl isn't present # in the default closure. - outputs = [ "out" "dev" "openssl" ]; + outputs = [ "out" "dev" ] + ++ stdenv.lib.optional sslSupport "openssl" + ; outputBin = "dev"; - propagatedBuildOutputs = [ "out" "openssl" ]; + propagatedBuildOutputs = [ "out" ] + ++ stdenv.lib.optional sslSupport "openssl" + ; - buildInputs = [ openssl ] ++ stdenv.lib.optional stdenv.isCygwin findutils; + buildInputs = [] + ++ stdenv.lib.optional sslSupport openssl + ++ stdenv.lib.optional stdenv.isCygwin findutils + ; - postInstall = '' + postInstall = stdenv.lib.optionalString sslSupport '' moveToOutput "lib/libevent_openssl*" "$openssl" substituteInPlace "$dev/lib/pkgconfig/libevent_openssl.pc" \ --replace "$out" "$openssl" |