1 { lib, stdenv, fetchurl, dpkg, autoPatchelfHook, makeWrapper, electron
2 , alsa-lib, glibc, gtk3, libxshmfence, mesa, nss }:
4 stdenv.mkDerivation rec {
5 pname = "threema-desktop";
9 # As Threema only offers a Latest Release url, the plan is to upload each
10 # new release url to web.archive.org until their Github releases page gets populated.
11 url = "https://web.archive.org/web/20230731230034if_/https://releases.threema.ch/web-electron/v1/release/Threema-Latest.deb";
12 hash = "sha256-eZ/bjcSnrnzub1G4sbwPn3GCTwhDfFuYv9Plf5SJL90=";
21 buildInputs = [ alsa-lib glibc gtk3 libxshmfence mesa nss ];
27 # Can't unpack with the common dpkg-deb -x method
28 dpkg --fsys-tarfile $src | tar --extract
34 # This will cause confusion, not needed
42 mv $out/share/applications/threema.desktop $out/share/applications/threema-desktop.desktop
43 makeWrapper ${electron}/bin/electron $out/bin/threema \
44 --add-flags $out/lib/threema/resources/app.asar
48 description = "Desktop client for Threema, a privacy-focused end-to-end encrypted mobile messenger";
49 mainProgram = "threema";
50 homepage = "https://threema.ch";
51 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
52 license = licenses.agpl3Only;
53 maintainers = with maintainers; [ wolfangaukang ];
54 platforms = [ "x86_64-linux" ];