uwsgi: fix build when withSystemd = false

Passing -lsystemd unconditionally breaks the build when withSystemd = false.
This commit is contained in:
Joachim Fasting 2018-12-07 13:23:09 +01:00
parent c26dbef830
commit e7548891e3
No known key found for this signature in database
GPG Key ID: 5C204DF675C90294

View File

@ -89,7 +89,7 @@ stdenv.mkDerivation rec {
${lib.concatMapStringsSep "\n" (x: x.install or "") needed}
'';
NIX_CFLAGS_LINK = [ "-lsystemd" ] ++ lib.concatMap (x: x.NIX_CFLAGS_LINK or []) needed;
NIX_CFLAGS_LINK = lib.optional withSystemd "-lsystemd" ++ lib.concatMap (x: x.NIX_CFLAGS_LINK or []) needed;
meta = with stdenv.lib; {
homepage = https://uwsgi-docs.readthedocs.org/en/latest/;