From c33e078c013211952d9e2d097c6c3199657bc9fd Mon Sep 17 00:00:00 2001 From: Thomas Dy Date: Tue, 29 Dec 2020 12:01:42 +0900 Subject: [PATCH 1/2] redis: build with TLS support --- pkgs/servers/nosql/redis/default.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/nosql/redis/default.nix b/pkgs/servers/nosql/redis/default.nix index 38e12010f416..5865c4f55b61 100644 --- a/pkgs/servers/nosql/redis/default.nix +++ b/pkgs/servers/nosql/redis/default.nix @@ -1,4 +1,6 @@ -{ stdenv, fetchurl, lua, pkgconfig, systemd, jemalloc, nixosTests }: +{ stdenv, fetchurl, lua, pkgconfig, systemd, jemalloc, nixosTests +, tlsSupport ? true, openssl +}: stdenv.mkDerivation rec { version = "6.0.6"; @@ -18,14 +20,17 @@ stdenv.mkDerivation rec { ''} ''; - buildInputs = [ lua pkgconfig ] ++ stdenv.lib.optional (stdenv.isLinux && !stdenv.hostPlatform.isMusl) systemd; + buildInputs = [ lua pkgconfig ] + ++ stdenv.lib.optional (stdenv.isLinux && !stdenv.hostPlatform.isMusl) systemd + ++ stdenv.lib.optionals tlsSupport [ openssl ]; # More cross-compiling fixes. # Note: this enables libc malloc as a temporary fix for cross-compiling. # Due to hardcoded configure flags in jemalloc, we can't cross-compile vendored jemalloc properly, and so we're forced to use libc allocator. # 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)" ] ++ stdenv.lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ "AR=${stdenv.cc.targetPrefix}ar" "RANLIB=${stdenv.cc.targetPrefix}ranlib" "MALLOC=libc" ] - ++ stdenv.lib.optional (stdenv.isLinux && !stdenv.hostPlatform.isMusl) ["USE_SYSTEMD=yes"]; + ++ stdenv.lib.optional (stdenv.isLinux && !stdenv.hostPlatform.isMusl) ["USE_SYSTEMD=yes"] + ++ stdenv.lib.optionals tlsSupport [ "BUILD_TLS=yes" ]; enableParallelBuilding = true; From 17f33c9be14afa8a21fe0844cd5c3dd7b3a8d02c Mon Sep 17 00:00:00 2001 From: Thomas Dy Date: Mon, 4 Jan 2021 11:10:23 +0900 Subject: [PATCH 2/2] redis: move pkgconfig to nativeBuildInputs --- pkgs/servers/nosql/redis/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/nosql/redis/default.nix b/pkgs/servers/nosql/redis/default.nix index 5865c4f55b61..507416be7339 100644 --- a/pkgs/servers/nosql/redis/default.nix +++ b/pkgs/servers/nosql/redis/default.nix @@ -20,7 +20,9 @@ stdenv.mkDerivation rec { ''} ''; - buildInputs = [ lua pkgconfig ] + nativeBuildInputs = [ pkgconfig ]; + + buildInputs = [ lua ] ++ stdenv.lib.optional (stdenv.isLinux && !stdenv.hostPlatform.isMusl) systemd ++ stdenv.lib.optionals tlsSupport [ openssl ]; # More cross-compiling fixes.