mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-20 20:03:24 +00:00
Merge pull request #79970 from dtzWill/fix/lwan-jemalloc-use-if-gonna-use-but-not-with-musl
This commit is contained in:
commit
8bc584626b
@ -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,7 +13,12 @@ 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 = lib.optional enableJemalloc "-DUSE_ALTERNATIVE_MALLOC=jemalloc";
|
||||
|
||||
hardeningDisable = lib.optional stdenv.hostPlatform.isMusl "pie";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Lightweight high-performance multi-threaded web server";
|
||||
|
Loading…
Reference in New Issue
Block a user