mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-19 11:23:29 +00:00
proton-pass: fix missing tray icon
The Tray Icon pixmaps are not part of the ASAR, it looks like Electron is expecting to find them into <asar-root-folder>/assets. This commit should fix the issue of the Tray Icon not being visible on the DEs (issue #347830)
This commit is contained in:
parent
652b22a375
commit
aa3ca21825
@ -5,6 +5,7 @@
|
||||
dpkg,
|
||||
makeWrapper,
|
||||
electron,
|
||||
asar,
|
||||
}:
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "proton-pass";
|
||||
@ -21,21 +22,30 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
nativeBuildInputs = [
|
||||
dpkg
|
||||
makeWrapper
|
||||
asar
|
||||
];
|
||||
|
||||
# Rebuild the ASAR archive with the assets embedded
|
||||
preInstall = ''
|
||||
asar extract usr/lib/proton-pass/resources/app.asar tmp
|
||||
cp -r usr/lib/proton-pass/resources/assets/ tmp/
|
||||
rm usr/lib/proton-pass/resources/app.asar
|
||||
asar pack tmp/ usr/lib/proton-pass/resources/app.asar
|
||||
rm -fr tmp
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out
|
||||
mkdir -p $out/share/proton-pass
|
||||
cp -r usr/share/ $out/
|
||||
cp -r usr/lib/proton-pass/resources/app.asar $out/share/
|
||||
cp -r usr/lib/proton-pass/resources/app.asar $out/share/proton-pass/
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
makeWrapper ${lib.getExe electron} $out/bin/proton-pass \
|
||||
--add-flags $out/share/app.asar \
|
||||
--add-flags $out/share/proton-pass/app.asar \
|
||||
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \
|
||||
--set-default ELECTRON_FORCE_IS_PACKAGED 1 \
|
||||
--set-default ELECTRON_IS_DEV 0 \
|
||||
--inherit-argv0
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user