3
0
Fork 0
forked from mirrors/nixpkgs

redis: add withSystemd argument

This commit is contained in:
Dmitry Kalinkin 2021-04-18 09:40:25 -04:00
parent 9b3ab07eba
commit e8b81fe04d
No known key found for this signature in database
GPG key ID: 5157B3EC8B2CA333

View file

@ -1,4 +1,5 @@
{ lib, stdenv, fetchurl, lua, pkg-config, systemd, nixosTests
{ lib, stdenv, fetchurl, lua, pkg-config, nixosTests
, withSystemd ? stdenv.isLinux && !stdenv.hostPlatform.isMusl, systemd
, tlsSupport ? true, openssl
}:
@ -23,7 +24,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkg-config ];
buildInputs = [ lua ]
++ lib.optional (stdenv.isLinux && !stdenv.hostPlatform.isMusl) systemd
++ lib.optional withSystemd systemd
++ lib.optionals tlsSupport [ openssl ];
# More cross-compiling fixes.
# Note: this enables libc malloc as a temporary fix for cross-compiling.
@ -31,7 +32,7 @@ stdenv.mkDerivation rec {
# It's weird that the build isn't failing because of failure to compile dependencies, it's from failure to link them!
makeFlags = [ "PREFIX=$(out)" ]
++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ "AR=${stdenv.cc.targetPrefix}ar" "RANLIB=${stdenv.cc.targetPrefix}ranlib" "MALLOC=libc" ]
++ lib.optional (stdenv.isLinux && !stdenv.hostPlatform.isMusl) ["USE_SYSTEMD=yes"]
++ lib.optional withSystemd [ "USE_SYSTEMD=yes" ]
++ lib.optionals tlsSupport [ "BUILD_TLS=yes" ];
enableParallelBuilding = true;