git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #29522 from aneeshusa/libevent-make-openssl-dependency-optional

libevent: Make OpenSSL dependency optional

commit11efdaf404be285aa9b59c387b1d5c0c322ebbdc authorJörg Thalheim <Mic92@users.noreply.github.com> dateTue 19 Sep 2017, 08:48 (9 years ago) parentef3cb5c42a8ac1
1 file changed+16−5
pkgs/development/libraries/libevent/default.nix+16−5
pkgs/development/libraries/libevent/default.nix+16−5
@@ -1,4 +1,8 @@
1−{ stdenv, fetchurl, openssl, findutils }:
1+{ stdenv, fetchurl, findutils
2+, sslSupport? true, openssl
3+}:
4+
5+assert sslSupport -> openssl != null;
26
37stdenv.mkDerivation rec {
48 name = "libevent-${version}";
@@ -11,13 +15,20 @@ stdenv.mkDerivation rec {
1115
1216 # libevent_openssl is moved into its own output, so that openssl isn't present
1317 # in the default closure.
14− outputs = [ "out" "dev" "openssl" ];
18+ outputs = [ "out" "dev" ]
19+ ++ stdenv.lib.optional sslSupport "openssl"
20+ ;
1521 outputBin = "dev";
16− propagatedBuildOutputs = [ "out" "openssl" ];
22+ propagatedBuildOutputs = [ "out" ]
23+ ++ stdenv.lib.optional sslSupport "openssl"
24+ ;
1725
18− buildInputs = [ openssl ] ++ stdenv.lib.optional stdenv.isCygwin findutils;
26+ buildInputs = []
27+ ++ stdenv.lib.optional sslSupport openssl
28+ ++ stdenv.lib.optional stdenv.isCygwin findutils
29+ ;
1930
20− postInstall = ''
31+ postInstall = stdenv.lib.optionalString sslSupport ''
2132 moveToOutput "lib/libevent_openssl*" "$openssl"
2233 substituteInPlace "$dev/lib/pkgconfig/libevent_openssl.pc" \
2334 --replace "$out" "$openssl"