Package Details: threema-desktop 1.2.50-3

Git Clone URL: https://aur.archlinux.org/threema-desktop.git (read-only, click to copy)
Package Base: threema-desktop
Description: Threema Desktop (Threema Web in Electron).
Upstream URL: https://github.com/threema-ch/threema-web-electron
Licenses: AGPL-3.0-only
Submitter: dbrgn
Maintainer: dbrgn
Last Packager: dbrgn
Votes: 16
Popularity: 0.000007
First Submitted: 2021-10-27 10:38 (UTC)
Last Updated: 2026-03-13 13:33 (UTC)

Latest Comments

1 2 3 4 5 6 7 Next › Last »

dbrgn commented on 2025-07-15 21:51 (UTC)

hardfalcon: I used most of your suggested PKGBUILD.

electron37 is not yet in the regular Arch package sources, so I used 36 instead.

hardfalcon commented on 2025-07-15 04:21 (UTC) (edited on 2025-07-15 04:23 (UTC) by hardfalcon)

Here's a PKGBUILD that works for me, and that also moves the "download JS cruft" part from the build() into the prepare() function:

# Maintainer: Danilo <aur ät dbrgn döt ch>
pkgname=threema-desktop
_binname=threema
_variant=consumer
_appname="Threema"
pkgdesc="Threema Desktop (Threema Web in Electron)."
pkgver=1.2.48
pkgrel=0
_threema_web_ver=2.6.2 # Keep in sync with version used by threema-desktop
arch=('any')
url="https://github.com/threema-ch/threema-web-electron"
license=('AGPL-3.0-only')
# Upstream still uses electron 32.2.0, but electron 32 has been EOL since 2025-03-04
_electron=electron37
depends=(${_electron})
makedepends=(git nodejs-lts-iron npm)
source=(
  "threema-web-electron-v${pkgver}.tar.gz::https://github.com/threema-ch/threema-web-electron/archive/refs/tags/${pkgver}.tar.gz"
  "threema-web-v${_threema_web_ver}.tar.gz::https://github.com/threema-ch/threema-web/archive/refs/tags/v${_threema_web_ver}.tar.gz"
  "threema.desktop"
)
sha256sums=('bd94de9c014f2f0a6fc96e5a00a15d90a0c049d885c6a16a228eff5d65761c35'
            '038b2dbea414020d8bd2a11b18896e6b06348f82c7b963d8b3fe983a23b658eb'
            '9fed7fdd6f9b6e4b53caafc9ef8608b7bd73c1272ab4380d5d6839c3c60deb8b')

prepare() {
  cd "${srcdir}/threema-web-electron-${pkgver}/"

  # Move threema-web source code (since threema-web-electron submodule
  # is not contained in GitHub export)
  rm -r "app/dependencies/threema-web"
  mv "${srcdir}/threema-web-${_threema_web_ver}" "app/dependencies/threema-web"

  # Download dependencies for building Threema Web
  export DEV_ENV=production
  export THREEMA_WEB_VERSION=threema-web-${_threema_web_ver}
  npm install --no-audit
}

build() {
  cd "${srcdir}/threema-web-electron-${pkgver}/"

  # Build Threema Web
  export DEV_ENV=production
  export THREEMA_WEB_VERSION=threema-web-${_threema_web_ver}
  ./tools/patches/patch-threema-web.sh
  npm run app:build:web
  ./tools/patches/post-patch-threema-web.sh
  touch app/dependencies/threema-web/release/threema-web-${_threema_web_ver}/userconfig.overrides.js

  # Build Electron app
  npm run app:install
  _target_os=linux-deb
  _target_dist=linux:deb
  node tools/patches/post-patch-threema-web.js $_target_os $_variant
  if [ "$_variant" = "blue" ]; then node tools/patches/blue-patch-threema-web.js; fi
  npm run electron:dist:$_target_dist:$_variant
}

package() {
  cd "${srcdir}/"

  _app_root="${srcdir}/threema-web-electron-${pkgver}"

  # Copy application
  mkdir -p "${pkgdir}/usr/lib/${pkgname}/resources/"
  cp "${_app_root}/app/build/dist-electron/packaged/${_appname}-linux-x64/resources/app.asar" \
     "${pkgdir}/usr/lib/${pkgname}/resources/"

  # Create launcher
  mkdir -p "${pkgdir}/usr/bin/"
  _launcher="${pkgdir}/usr/bin/${_binname}"
  echo -e "#!/bin/sh\nexec ${_electron} '/usr/lib/${pkgname}/resources/app.asar' \${@}" > "$_launcher"
  chmod +x "$_launcher"

  # Copy desktop files
  mkdir -p "${pkgdir}/usr/share/applications"
  mkdir -p "${pkgdir}/usr/share/pixmaps"
  cp "${_app_root}/app/assets/icons/png/${_variant}-512x512.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
  cp "${srcdir}/threema.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
  sed -i -s "s/{{appname}}/${_appname}/" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
  sed -i -s "s/{{binname}}/${_binname}/" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
  sed -i -s "s/{{pkgname}}/${pkgname}/" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
  sed -i -s "s/{{pkgdesc}}/${pkgdesc}/" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
}

hardfalcon commented on 2025-07-15 04:20 (UTC)

Trying to build this package in a clean chroot fails because something in that obscure Node/NPM cruft stack tries to use python3, which is not installed, because the python package is hasn't been added to the makedepends array.

When I add python to the makedeps array, the build fails because the distutils module in python is missing. However, this module has been removed in Python 3.13, so you'd have to use python312, which is another AUR package and takes a while to build.

These issues seem to occur only if another Node version than 20.x is used, so an easy way to fix this without requiring any python packages at all is to use nodejs-lts-iron instead of nodejs-lts-jod.

Also, the electron34 dependency should be updated to electron36 because Electron 34 is EOL since 2025-06-24 (upstream still uses electron 32.2.0 although Electron 32 has been EOL since 2025-03-04).

<deleted-account> commented on 2025-06-08 10:58 (UTC)

NodeJS 22 is perfectly fine. This is the latest LTS Version. NodeJS 24 is NOT (yet) LTS. The nodejs-lts package always installs to the latest LTS version (which is 22 at the moment). 24 will most likely become LTS in October, I think.

dbrgn commented on 2025-06-07 20:00 (UTC)

Kayahr: My initial testing was insufficient - I now realized that some of the deps are incompatible with NodeJS 24. I reverted to 22 (the previous LTS).

dbrgn commented on 2025-06-07 19:43 (UTC)

Kayahr: Upstream tests with NodeJS 20, which is LTS until April next year.

I changed the dependency to nodejs. As long as nothing breaks we can keep that, but otherwise I'd revert to NodeJS 20.

<deleted-account> commented on 2025-06-06 21:05 (UTC)

Why is this package suddenly depending on an old version of nodejs? When I try to update from 1.2.47-1 to 1.2.47-2 then it wants to replace the current LTS version of Node.js (nodejs-lts-jod-22.16.0-1) with the previous lts version (nodejs-lts-iron-20.19.2-1).

EDIT: Ok, this is no current change. It used nodejs 20 for quite some time and I guess I installed Nodejs 22 AFTER installing the previous version of the Threema package. And now the Threema package update wants to install Nodejs 20 again. Is it possible that you upgrade your package to use the CURRENT lts version instead of the previous one, please?

dbrgn commented on 2024-12-20 21:54 (UTC)

@dreieck: While you are right of course, Threema Web (and thus also Threema Desktop 1.x) is in maintenance mode and will be replaced with the Desktop 2.x application soonish: https://three.ma/md Thus I don't plan to make any big changes to this package as long as the current version works.

Working patches would be welcome of course, but I'm not sure it's worth the effort.

dreieck commented on 2024-12-20 11:31 (UTC)

This downloads stuff in build(). This should not happen, build() (and package()) should not require network access.

Please download the node and npm specific stuff in prepare().

Regards and thankgs for the package!

dbrgn commented on 2024-01-27 17:42 (UTC)

@Mailaender: Oof, sorry, that was a stupid copy-paste-error. It is fixed now, thanks for the note.