Pre‐allocate hugepages for Firefox, Thunderbird and mpv
This commit is contained in:
parent
4df412b109
commit
014cd8eb9c
1 changed files with 20 additions and 3 deletions
|
@ -15,9 +15,26 @@ in {
|
||||||
secureBuild = true;
|
secureBuild = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
firefox = final.wrapFirefox final.firefox-unwrapped { };
|
firefox = (final.wrapFirefox final.firefox-unwrapped { }).overrideAttrs (prevAttrs: {
|
||||||
mpv = final.mpv-unwrapped.wrapper { mpv = final.mpv-unwrapped; };
|
buildCommand = prevAttrs.buildCommand + ''
|
||||||
thunderbird = final.wrapThunderbird final.thunderbird-unwrapped { };
|
sed -i \
|
||||||
|
'$i export MIMALLOC_RESERVE_HUGE_OS_PAGES=2' \
|
||||||
|
"$out/bin/firefox"
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
|
||||||
|
thunderbird = (final.wrapThunderbird final.thunderbird-unwrapped { }).overrideAttrs (prevAttrs: {
|
||||||
|
buildCommand = prevAttrs.buildCommand + ''
|
||||||
|
sed -i \
|
||||||
|
'$i export MIMALLOC_RESERVE_HUGE_OS_PAGES=2' \
|
||||||
|
"$out/bin/thunderbird"
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
|
||||||
|
mpv = final.mpv-unwrapped.wrapper {
|
||||||
|
mpv = final.mpv-unwrapped;
|
||||||
|
extraMakeWrapperArgs = [ "--set" "MIMALLOC_RESERVE_HUGE_OS_PAGES" "1" ];
|
||||||
|
};
|
||||||
} // lib.genAttrs [
|
} // lib.genAttrs [
|
||||||
"bat"
|
"bat"
|
||||||
"bottom"
|
"bottom"
|
||||||
|
|
Loading…
Reference in a new issue