From 5ca306875ca5e432f074603846826d742c12bd71 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Wed, 12 Feb 2020 20:25:58 -0600 Subject: [PATCH] lwan: no jemalloc w/musl --- pkgs/servers/http/lwan/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/http/lwan/default.nix b/pkgs/servers/http/lwan/default.nix index 7d6d34a6d2db..71f45028c314 100644 --- a/pkgs/servers/http/lwan/default.nix +++ b/pkgs/servers/http/lwan/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, pkg-config, zlib, cmake, jemalloc }: +{ lib, stdenv, fetchFromGitHub, pkg-config, zlib, cmake, enableJemalloc ? !stdenv.hostPlatform.isMusl, jemalloc }: stdenv.mkDerivation rec { pname = "lwan"; @@ -13,10 +13,10 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config ]; - buildInputs = [ jemalloc zlib ]; + buildInputs = [ zlib ] ++ lib.optional enableJemalloc jemalloc; # Note: tcmalloc and mimalloc are also supported (and normal malloc) - cmakeFlags = [ "-DUSE_ALTERNATIVE_MALLOC=jemalloc" ]; + cmakeFlags = lib.optional enableJemalloc "-DUSE_ALTERNATIVE_MALLOC=jemalloc"; meta = with lib; { description = "Lightweight high-performance multi-threaded web server";