10 # On some platforms the unprefixed feature will be ignored:
11 # https://github.com/tikv/jemallocator/blob/ab0676d77e81268cd09b059260c75b38dbef2d51/jemalloc-sys/src/env.rs
12 unprefixed' = unprefixed && !stdenv.hostPlatform.isMusl && !stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isAndroid;
14 in jemalloc.overrideAttrs (oldAttrs: {
15 configureFlags = oldAttrs.configureFlags ++ [
16 "--with-private-namespace=_rjem_"
17 ] ++ lib.optionals (!unprefixed') [
18 "--with-jemalloc-prefix=_rjem_"
21 setupHook = writeText "setup-hook.sh" ''
22 export JEMALLOC_OVERRIDE="@out@/lib/libjemalloc${stdenv.hostPlatform.extensions.library}"