fix(nix/vesktop): NodeJS pain on macOS

This commit is contained in:
Ahmad Ansori Palembani 2025-05-01 15:11:44 +07:00
parent 1bdec0da31
commit e5a8a50001
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6
4 changed files with 34 additions and 20 deletions

View file

@ -1,13 +1,24 @@
final: prev:
{
# Replace the icon with a much more low profile icon
# REF: https://github.com/Vencord/Vesktop/pull/865
vesktop = prev.vesktop.overrideAttrs (old: {
preBuild =
old.preBuild
+ ''
cp -f ${../../include/vesktop/icon.icns} build/icon.icns
'';
});
# Replace the icon with a much more low profile icon
# REF: https://github.com/Vencord/Vesktop/pull/865
let
vesktop = if prev.stdenv.isDarwin then
# Use casks version because nodejs is pain
prev.casks.vesktop.overrideAttrs (old: {
configurePhase =
''
cp -f ${../../include/vesktop/icon.icns} Contents/Resources/icon.icns
'';
})
else
prev.vesktop.overrideAttrs (old: {
preBuild =
old.preBuild
+ ''
cp -f ${../../include/vesktop/icon.icns} build/icon.icns
'';
});
in {
inherit vesktop;
}