lwan: no jemalloc w/musl

This commit is contained in:
Will Dietz 2020-02-12 20:25:58 -06:00
parent 0341e3d535
commit 5ca306875c

View file

@ -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";