fractal: Pre‐allocate single hugepage

This commit is contained in:
Mikael 2024-10-11 12:31:09 +02:00
parent 4d9d033d4c
commit 00fab0858d
Signed by: mikael
SSH key fingerprint: SHA256:21QyD2Meiot7jOUVitIR5YkGB/XuXdCvLW1hE6dsri0

View file

@ -30,6 +30,18 @@ in {
"$out/bin/thunderbird"
'';
});
fractal = prev.fractal.overrideAttrs (prevAttrs: {
nativeBuildInputs = prevAttrs.nativeBuildInputs or [ ] ++ [ final.makeBinaryWrapper ];
buildInputs = prevAttrs.buildInputs or [ ] ++ [ final.mimalloc ];
NIX_RUSTFLAGS = lib.toList prevAttrs.NIX_RUSTFLAGS or [ ] ++ [ "-C link-arg=-lmimalloc" ];
postInstall = prevAttrs.postInstall or "" + ''
wrapProgram "$out/bin/fractal" \
--set MIMALLOC_RESERVE_HUGE_OS_PAGES 1
'';
});
mpv = final.mpv-unwrapped.wrapper {
mpv = final.mpv-unwrapped;
@ -43,7 +55,6 @@ in {
"erlang"
"fd"
"firefox-unwrapped"
"fractal"
"fuzzel"
"helix"
"kitty"