summary refs log tree commit diff
path: root/pkgs/servers
diff options
context:
space:
mode:
authorWill Dietz <w@wdtz.org>2020-02-12 20:25:58 -0600
committerWill Dietz <w@wdtz.org>2022-03-21 11:16:30 -0500
commit5ca306875ca5e432f074603846826d742c12bd71 (patch)
tree0c53cb7a39f90b36f691f5810e1edf2d60d438f4 /pkgs/servers
parent0341e3d535bd0856bd664bfcaa8f16824535d8ba (diff)
downloadnixpkgs-5ca306875ca5e432f074603846826d742c12bd71.tar
nixpkgs-5ca306875ca5e432f074603846826d742c12bd71.tar.gz
nixpkgs-5ca306875ca5e432f074603846826d742c12bd71.tar.bz2
nixpkgs-5ca306875ca5e432f074603846826d742c12bd71.tar.lz
nixpkgs-5ca306875ca5e432f074603846826d742c12bd71.tar.xz
nixpkgs-5ca306875ca5e432f074603846826d742c12bd71.tar.zst
nixpkgs-5ca306875ca5e432f074603846826d742c12bd71.zip
lwan: no jemalloc w/musl
Diffstat (limited to 'pkgs/servers')
-rw-r--r--pkgs/servers/http/lwan/default.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/servers/http/lwan/default.nix b/pkgs/servers/http/lwan/default.nix
index 7d6d34a6d2d..71f45028c31 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";