2023-06-11 20:54:11 +00:00
|
|
|
final: prev: {
|
|
|
|
signal-desktop = prev.signal-desktop.overrideAttrs (oldAttrs: rec {
|
2023-07-02 11:13:40 +00:00
|
|
|
inherit (oldAttrs) pname;
|
2023-06-11 20:54:11 +00:00
|
|
|
dir = "Signal";
|
2023-09-29 15:50:41 +00:00
|
|
|
electron = prev.electron_24;
|
2023-06-11 20:54:11 +00:00
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
gappsWrapperArgs+=(
|
|
|
|
--prefix LD_LIBRARY_PATH : "${prev.lib.makeLibraryPath [prev.stdenv.cc.cc]}"
|
|
|
|
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
|
|
|
|
--suffix PATH : ${prev.lib.makeBinPath [prev.xdg-utils]}
|
|
|
|
)
|
|
|
|
# Fix the desktop link
|
|
|
|
substituteInPlace $out/share/applications/${pname}.desktop \
|
|
|
|
--replace "/opt/${dir}/${pname}" $out/bin/${pname}
|
|
|
|
autoPatchelf --no-recurse -- "$out/lib/${dir}/"
|
|
|
|
patchelf --add-needed ${prev.libpulseaudio}/lib/libpulse.so "$out/lib/${dir}/resources/app.asar.unpacked/node_modules/@signalapp/ringrtc/build/linux/libringrtc-x64.node"
|
|
|
|
'';
|
|
|
|
});
|
|
|
|
}
|