discord: fix krisp by using fhsEnv on linux#424232
discord: fix krisp by using fhsEnv on linux#424232samschlegel wants to merge 2 commits intoNixOS:masterfrom
Conversation
Fixes NixOS#195512 This fixes Krisp, by moving to using an fhsEnv and not striping or modifying the binary in any way. I make Cursor do this for me so I'll need to come back tomorrow and actually see what cursed extra bullshit it added lol BUT IT WORKS!!!
| # Execute Discord | ||
| exec ${discordDir}/${binaryName} \ | ||
| --no-sandbox \ | ||
| --disable-gpu-sandbox \ |
There was a problem hiding this comment.
Yeah, this definitely seems non-ideal lol. Hopefully there's some other way around the zygote/GPU launch issues?
There was a problem hiding this comment.
So this seems to be common between other electron apps, and the only other solution I've found seems to be not putting it in a sandbox, or using something like the Flathub version does with https://github.com/refi64/zypak to wrap Chromium in a way that it works in a nested sandbox. I don't see any specific usages of this tool in nixpkgs but perhaps there's another option.
At this point though this works well enough for my use cases so I won't personally be looking into other paths
There was a problem hiding this comment.
Hey, I tried running the binary directly from your PR result/bin/Discord, removed those two flags and it seemed to run just fine? I'm not sure if they changed anything but your PR works for me. When was the application crashing for you?
There was a problem hiding this comment.
I know there was an electron upgrade recently so perhaps that fixed things? I've actually moved back to a fedora base + home-manager so if you want to make that change then go for it
Fixes #195512
This fixes Krisp, which was broken since the binary was getting modified. By moving to using an fhsEnv instead of patchElf and not striping or modifying the binary in any way, the checksum passes.
Don't have a darwin machine to test this on ATM, and tbh don't even know if this is an issue there, so only made the change on the linux side
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.