From 41b5625598ee0ff2f53dc8773e13ca88ce340e61 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Wed, 31 May 2023 20:57:52 +0200 Subject: [PATCH] signal-desktop: use 6.19.0 from overlay --- overlays/signal-desktop.nix | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 overlays/signal-desktop.nix diff --git a/overlays/signal-desktop.nix b/overlays/signal-desktop.nix new file mode 100644 index 00000000..efdb86f2 --- /dev/null +++ b/overlays/signal-desktop.nix @@ -0,0 +1,26 @@ +final: prev: { + signal-desktop = prev.signal-desktop.overrideAttrs (oldAttrs: rec { + pname = "signal-desktop"; + dir = "Signal"; + version = "6.19.0"; + hash = "sha256-D54A9z5+Y3ns363Zl8IChnykEBhOz8aJCgTCQIjq/fc="; + + src = prev.fetchurl { + url = "https://updates.signal.org/desktop/apt/pool/main/s/${pname}/${pname}_${version}_amd64.deb"; + inherit hash; + }; + + 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" + ''; + }); +}