2023-11-02 09:10:08 +00:00
# arch package:
# - <https://gitlab.archlinux.org/archlinux/packaging/packages/signal-desktop/-/blob/main/PKGBUILD?ref_type=heads>
# - builds with `yarn generate; yarn build`
2023-11-02 10:24:23 +00:00
# alpine package:
# - <https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/testing/signal-desktop/APKBUILD?ref_type=heads>
# - more involved build process, apparently to reuse deps shared with other parts of the OS:
# - manually build signal's webrtc using ninja
# - manually build signal's ringrtc using yarn
# - manually build libsignal with yarn, cargo and cbindgen
# - yarn build:acknowledgments
# - yarn patch-package
# - npm rebuild esbuild # apparently esbuild is to be used later in the build process
# - yarn build:dev
# - yarn install
# - then it `mv`s and `patch`s a bunch of stuff
# - tasje pack
2023-11-02 09:10:08 +00:00
#
2023-11-02 15:52:23 +00:00
#
2023-11-15 22:40:13 +00:00
### TODO: build more components from source:
2023-11-02 15:52:23 +00:00
#
2023-11-15 22:40:13 +00:00
# - the dependencies which alpine builds live over here:
# - <https://github.com/signalapp/libsignal/archive/refs/tags/v$_libsignalver/libsignal-$_libsignalver.tar.gz>
# - <https://github.com/signalapp/ringrtc/archive/refs/tags/v$_ringrtcver/ringrtc-$_ringrtcver.tar.gz>
# - <https://s3.sakamoto.pl/lnl-aports-snapshots/webrtc-$_webrtcver.tar.zst>
# - <https://github.com/signalapp/Signal-FTS5-Extension/archive/refs/tags/v$_stokenizerver/stokenizer-$_stokenizerver.tar.gz>
2023-11-02 15:52:23 +00:00
#
2023-11-15 22:40:13 +00:00
# - nixpkgs packages libsignal-protocol-c, but i think not the actual `libsignal`
# - <https://github.com/signalapp/libsignal-protocol-c>
# - flare-signal references <https://github.com/signalapp/libsignal>
# - same with gurk-rs
# - neither of these do anything special with it.
# - however, they do refer to it as `name = "libsignal-protocol"`, so maybe libsignal-protocol-c is quite related?
# - and also `name = "poksho"`, signal-crypto, zkcredential, zkgroup, etc
2023-11-04 14:52:09 +00:00
#
2023-11-15 22:40:13 +00:00
#### better-sqlite
# try:
# - npm rebuild @signalapp/better-sqlite3 --offline
# - npm rebuild @signalapp/better-sqlite3 --offline --nodedir="${nodeSources}" --build-from-source
# - patchelf --add-needed ${icu}/lib/libicutu.so node_modules/@signalapp/better-sqlite3/build/Release/better_sqlite3.node
# or:
# - npm rebuild \
# @signalapp/better-sqlite3 \
# sharp spellchecker websocket \
# utf-8-validate bufferutil fs-xattr \
# --offline --nodedir="${nodeSources}" --build-from-source
# or:
# - npm_config_nodedir="${nodeSources}" npm_config_node_gyp="${buildPackages.nodejs}/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" npm rebuild --verbose --sqlite=${sqlite.dev} @signalapp/better-sqlite3
2023-11-02 15:52:23 +00:00
#
2023-11-15 22:40:13 +00:00
# or, with nodeSources = srcOnly nodejs';
# - pushd node_modules/@signalapp/better-sqlite3
# - patch -p1 < ${bettersqlitePatch}
# - npm run build-release --offline
# - npm run build-release --offline --nodedir="${nodeSources}"
# - find build -type f -exec \
# remove-references-to \
# -t "${nodeSources}" {} \;
# - popd
2023-11-05 14:49:40 +00:00
#
2023-11-15 22:40:13 +00:00
#### ringrtc:
2023-11-02 15:52:23 +00:00
# - readme says that it's going to download webrtc components -- that's probably why Alpine builds that first
# - "To build the Node.js module suitable for including in an Electron app, run:"
# make electron PLATFORM=<platform> NODEJS_ARCH=<arch>
# - compiling x64 -> arm64 is supported, but arm64 -> arm64 is *not*
# - the referenced file is a 13 MB ELF: /nix/store/7hb6840x2f10zpm3d5ccj3kr3vaf93n5-signal-desktop-6.36.0/lib/Signal/resources/app.asar.unpacked/node_modules/@signalapp/ringrtc/build/linux/libringrtc-x64.node
# - not in crates.io
# - TODO: simplest test would be to just copy this out of nixpkgs' signal-desktop
#
2023-11-15 22:40:13 +00:00
#### webrtc:
2023-11-02 15:52:23 +00:00
# - nothing much in nixpkgs cites "signalapp", so i probably have to do this manually
# - nothing named `webrtc` linked from the signal-desktop appimage
# - it's like 900MB?? https://s3.sakamoto.pl/lnl-aports-snapshots/webrtc-5845h.tar.zst
# - not in crates.io
2023-11-30 09:58:25 +00:00
#
#
# HOW TO UPDATE
# - `nix run '.#update.pkgs.signal-desktop-from-src'`
# - delete `env.yarnOfflineCache.hash` and rebuild it
2023-11-02 15:52:23 +00:00
2023-11-02 09:10:08 +00:00
{ lib
2023-11-05 14:49:40 +00:00
, alsa-lib
, at-spi2-atk
, at-spi2-core
, atk
, autoPatchelfHook
2023-11-15 05:50:23 +00:00
, bash
2023-12-07 13:00:18 +00:00
, buildPackages
2023-11-05 14:49:40 +00:00
, cups
2023-11-15 22:40:13 +00:00
, electron_27-bin
2023-11-16 07:24:39 +00:00
, fetchurl
2023-11-02 09:10:08 +00:00
, fetchFromGitHub
2023-11-15 21:41:29 +00:00
, fetchYarnDeps
2023-11-05 14:49:40 +00:00
, flac
2023-11-02 09:10:08 +00:00
, fixup_yarn_lock
2023-11-05 14:49:40 +00:00
, gdk-pixbuf
2023-11-17 03:22:27 +00:00
, git
2023-11-30 09:58:25 +00:00
, gitUpdater
2023-11-15 05:50:23 +00:00
, gnused
2023-11-05 14:49:40 +00:00
, gtk3
, icu
, libpulseaudio
, libwebp
, libxslt
2023-12-03 12:18:55 +00:00
, makeShellWrapper
2023-11-05 14:49:40 +00:00
, mesa
2023-12-11 21:05:16 +00:00
, nodejs_18
2023-11-05 14:49:40 +00:00
, nspr
, nss
, pango
2023-11-02 09:10:08 +00:00
, python3
2023-11-15 22:40:13 +00:00
# , sqlite
# , sqlcipher
2023-11-02 09:10:08 +00:00
, stdenv
2023-11-05 14:49:40 +00:00
, wrapGAppsHook
2023-12-03 12:59:15 +00:00
, xdg-utils
2023-11-02 09:10:08 +00:00
, yarn
} :
let
2024-03-04 08:26:59 +00:00
version = " 7 . 0 . 0 " ;
2023-11-16 07:24:39 +00:00
ringrtcPrebuild = fetchurl {
2024-03-04 08:26:59 +00:00
# version is found in signal-desktop's package.json as "@signalapp/ringrtc"
url = " h t t p s : / / b u i l d - a r t i f a c t s . s i g n a l . o r g / l i b r a r i e s / r i n g r t c - d e s k t o p - b u i l d - v 2 . 3 6 . 0 . t a r . g z " ;
hash = " s h a 2 5 6 - B I p + 2 V 0 P V m R q A A 4 m X t 2 8 u t A M O A Y 4 G r R E L P 8 t f E T f 3 N s = " ;
2023-11-15 22:40:13 +00:00
} ;
2023-11-16 07:24:39 +00:00
sqlcipherTarball = fetchurl {
2024-03-04 08:26:59 +00:00
# this is a dependency of better-sqlite3.
# version/url is found in <repo:https://github.com/signalapp/better-sqlite3:deps/download.js>
# - checkout the better-sqlite3 tag which matches signal-dekstop's package.json "@signalapp/better-sqlite3" key.
2023-11-15 22:40:13 +00:00
url = " h t t p s : / / b u i l d - a r t i f a c t s . s i g n a l . o r g / d e s k t o p / s q l c i p h e r - 4 . 5 . 5 - f t s 5 - f i x - - 3 . 0 . 7 - - 0 . 2 . 1 - e f 5 3 e a 4 5 e d 9 2 b 9 2 8 e c f d 3 3 c 5 5 2 d 8 d 4 0 5 2 6 3 e 8 6 e 6 3 d e c 3 8 e 1 e c 6 3 e 1 b 0 1 9 3 b 6 3 0 b . t a r . g z " ;
2023-11-16 07:24:39 +00:00
hash = " s h a 2 5 6 - 7 1 P q R e 2 S u S j s / T P F U t j U B S Y + h u Y 9 7 D j h 7 G P h s B k 7 Y w s = " ;
2023-11-15 22:40:13 +00:00
} ;
# signal-fts5-extension = callPackage ./fts5-extension { };
# bettersqlitePatch = substituteAll {
# # this patch does more than just use the system sqlcipher.
# # it also tells bettersqlite to link against its needed runtime dependencies,
# # since there's a few statically linked things which aren't called out.
# # it also tells bettersqlite not to download sqlcipher when we `npm rebuild`
# src = ./bettersqlite-use-system-sqlcipher.patch;
# inherit sqlcipher;
# inherit (nodejs') libv8;
# signal_fts5_extension = signal-fts5-extension;
# };
2024-03-04 08:26:59 +00:00
src = fetchFromGitHub {
owner = " s i g n a l a p p " ;
repo = " S i g n a l - D e s k t o p " ;
leaveDotGit = true ; # signal calculates the release date via `git`
rev = " v ${ version } " ;
hash = " s h a 2 5 6 - i I P D U M F G L 2 a 6 J K b l S T Y 0 5 n P S D h F 4 b 4 A v y O 2 k 0 N Y 9 U J E = " ;
} ;
2023-12-07 13:00:18 +00:00
mkNodeJs = nodejs : nodejs . overrideAttrs ( upstream :
2023-11-14 02:18:28 +00:00
let
2023-12-19 20:53:33 +00:00
# build with the same nodejs upstream expects in package.json (it will error if the version here is incorrect)
2024-03-04 08:26:59 +00:00
version = " 1 8 . 1 8 . 2 " ;
hash = " s h a 2 5 6 - c k n i 8 K + U P s O F m V B P S y o r 0 x + 5 O H h y k b b M y m y L r f A e O 1 Y = " ;
2023-11-14 02:18:28 +00:00
in {
inherit version ;
2023-11-16 07:24:39 +00:00
src = fetchurl {
2023-11-14 02:18:28 +00:00
url = " h t t p s : / / n o d e j s . o r g / d i s t / v ${ version } / n o d e - v ${ version } . t a r . x z " ;
2023-11-16 07:24:39 +00:00
inherit hash ;
2023-11-14 02:18:28 +00:00
} ;
}
) ;
2024-03-04 08:26:59 +00:00
yarnOfflineCache = fetchYarnDeps {
yarnLock = " ${ src } / y a r n . l o c k " ;
hash = " s h a 2 5 6 - + I F z j T v 3 g h y F u 0 M R c a 2 S O + t z e Q P J G V W / K y W f 7 S d C m t Q = " ;
} ;
2023-12-11 21:05:16 +00:00
nodejs' = mkNodeJs nodejs_18 ;
2023-12-07 13:00:18 +00:00
# TODO: possibly i could instead use nodejs-slim (npm-less nodejs)
2023-12-11 21:05:16 +00:00
buildNodejs = mkNodeJs buildPackages . nodejs_18 ;
2023-12-07 13:00:18 +00:00
buildYarn = buildPackages . yarn . override { nodejs = buildNodejs ; } ;
2023-11-15 22:40:13 +00:00
# package.json locks electron to 25.y.z
2023-11-02 09:10:08 +00:00
# element-desktop uses electron_26
# nixpkgs has `electron` defaulted to electron_27
# alpine builds signal-desktop using its default electron version, i.e. 27.0.2
2023-11-15 22:40:13 +00:00
# verified working:
# - electron-bin (26)
# - electron_27-bin (builds, haven't extensively tested the runtime)
# the non-bin varieties *seem* to ship the wrong `electron.headers` property.
# - maybe they can work if i manually DL and ship the corresponding headers
electron' = electron_27-bin ;
2023-11-15 05:50:23 +00:00
buildNpmArch = if stdenv . buildPlatform . isAarch64 then " a r m 6 4 " else " x 6 4 " ;
hostNpmArch = if stdenv . hostPlatform . isAarch64 then " a r m 6 4 " else " x 6 4 " ;
crossNpmArchExt = if buildNpmArch == hostNpmArch then " " else " - ${ hostNpmArch } " ;
2023-11-02 09:10:08 +00:00
in
stdenv . mkDerivation rec {
pname = " s i g n a l - d e s k t o p - f r o m - s r c " ;
2024-03-04 08:26:59 +00:00
inherit src version ;
2023-11-02 09:10:08 +00:00
2023-12-03 12:18:55 +00:00
patches = [
# ./debug.patch
# fix bug that signal launches in the background on wayland
# - <https://github.com/signalapp/Signal-Desktop/issues/6368>
# - without this, signal can be started with `signal-desktop & ; sleep 5; signal-desktop`
# - the second instance wakes the first one, and then exits
./show-on-launch.patch
] ;
2023-11-05 14:49:40 +00:00
2023-11-02 09:10:08 +00:00
nativeBuildInputs = [
2023-11-05 14:49:40 +00:00
autoPatchelfHook
2023-11-02 09:10:08 +00:00
fixup_yarn_lock
2023-11-17 03:22:27 +00:00
git # to calculate build date
2023-11-15 05:50:23 +00:00
gnused
2023-12-03 12:18:55 +00:00
makeShellWrapper
2023-12-07 13:00:18 +00:00
buildNodejs
2023-11-02 09:10:08 +00:00
python3
2023-11-05 14:49:40 +00:00
wrapGAppsHook
2023-12-07 13:00:18 +00:00
buildYarn
2023-11-02 09:10:08 +00:00
] ;
2023-11-05 14:49:40 +00:00
2023-11-15 05:50:23 +00:00
buildInputs = [
alsa-lib
at-spi2-atk
at-spi2-core
atk
cups
2023-11-15 22:40:13 +00:00
electron'
2023-11-15 05:50:23 +00:00
flac
gdk-pixbuf
gtk3
libpulseaudio
libwebp
libxslt
mesa # for libgbm
2023-12-07 13:00:18 +00:00
nodejs' # to patch in the runtime
2023-11-15 05:50:23 +00:00
nspr
nss
pango
# so that bettersqlite may link against sqlcipher (see patch)
# but i don't know if it actually needs to. just copied this from alpine.
2023-11-15 22:40:13 +00:00
# sqlcipher
2023-11-15 05:50:23 +00:00
] ;
2023-11-02 09:10:08 +00:00
2024-03-04 08:26:59 +00:00
env . yarnOfflineCache = yarnOfflineCache ;
2023-11-17 03:22:27 +00:00
# env.SIGNAL_ENV = "production";
# env.NODE_ENV = "production";
2023-11-14 02:18:28 +00:00
# env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
2023-11-02 09:10:08 +00:00
2023-12-03 12:18:55 +00:00
dontWrapGApps = true ;
2023-12-07 13:00:18 +00:00
# NIX_DEBUG = 6;
2023-11-02 10:24:23 +00:00
postPatch = ''
# fixes build failure:
# > Fusing electron at /build/source/release/linux-unpacked/signal-desktop inspect-arguments=false
# > ⨯ EACCES: permission denied, open '/build/source/release/linux-unpacked/signal-desktop' failedTask=build stackTrace=Error: EACCES: permission denied, open '/build/source/release/linux-unpacked/signal-desktop'
# electron "fusing" (electron.flipFuses) seems to be configuring which functionality electron will support at runtime.
# notably: ELECTRON_RUN_AS_NODE, cookie encryption, NODE_OPTIONS env var, --inspect-* CLI args, app.asar validation
# skipping the fuse process seems relatively inconsequential
substituteInPlace ts/scripts/after-pack.ts \
- - replace ' await fuseElectron' ' // await fuseElectron'
'' ;
2023-11-02 09:10:08 +00:00
configurePhase = ''
2023-11-02 10:24:23 +00:00
runHook preConfigure
2023-11-17 03:22:27 +00:00
# XXX: Signal does not let clients connect if they're running a version that's > 90d old.
# to calculate the build date, it uses SOURCE_DATE_EPOCH (if set), else `git log`.
# nixpkgs sets SOURCE_DATE_EPOCH to 1980/01/01 by default, so unset it so Signal falls back to git date.
# see: Signal-Desktop/ts/scripts/get-expire-time.ts
export SOURCE_DATE_EPOCH =
2023-11-02 09:10:08 +00:00
export HOME = $ NIX_BUILD_TOP
2023-12-07 13:13:50 +00:00
yarn config - - offline set yarn-offline-mirror $ yarnOfflineCache
2023-11-02 09:10:08 +00:00
fixup_yarn_lock yarn . lock
2023-11-14 02:18:28 +00:00
# prevent any attempt at downloading nodejs C headers
2023-11-15 22:40:13 +00:00
# see: <https://www.electronjs.org/docs/latest/tutorial/using-native-node-modules>
tar xzf $ { electron' . headers }
2023-11-14 02:18:28 +00:00
export npm_config_nodedir = $ ( pwd ) /node_headers
2023-11-15 05:50:23 +00:00
export npm_config_arch = $ { buildNpmArch }
export npm_config_target_arch = $ { hostNpmArch }
2023-11-02 09:10:08 +00:00
# optional flags: --no-progress --non-interactive
# yarn install creates the node_modules/ directory
2023-11-14 02:18:28 +00:00
# --ignore-scripts tells yarn to not run the "install" or "postinstall" commands mentioned in dependencies' package.json
# since many of those require network access
2023-12-07 13:13:50 +00:00
yarn install - - offline - - frozen-lockfile - - ignore-scripts
2023-11-02 09:10:08 +00:00
patchShebangs node_modules /
2023-12-07 13:13:50 +00:00
patchShebangs - - build - - update node_modules / { bufferutil/node_modules/node-gyp-build / , node-gyp-build , utf-8-validate/node_modules/node-gyp-build }
2023-11-15 05:50:23 +00:00
# patch these out to remove a runtime reference back to the build bash
# (better, perhaps, would be for these build scripts to not be included in the asar...)
sed - i ' s : #!.*/bin/bash:#!/bin/sh:g' node_modules/@swc/helpers/scripts/gen.sh
sed - i ' s : #!.*/bin/bash:#!/bin/sh:g' node_modules/@swc/helpers/scripts/generator.sh
2024-03-04 08:26:59 +00:00
substituteInPlace node_modules/dashdash/etc/dashdash.bash_completion.in - - replace-fail ' #!/bin/bash' '#!/bin/sh'
set - x
2023-11-02 10:24:23 +00:00
2023-11-14 02:18:28 +00:00
# provide necessecities which were skipped as part of --ignore-scripts
cp $ { ringrtcPrebuild } node_modules / @ signalapp/ringrtc/scripts/prebuild.tar.gz
pushd node_modules / @ signalapp/ringrtc /
tar - xzf ./scripts/prebuild.tar.gz
popd
cp $ { sqlcipherTarball } node_modules / @ signalapp/better-sqlite3/deps/sqlcipher.tar.gz
pushd node_modules / @ signalapp/better-sqlite3
2024-03-04 08:26:59 +00:00
# node-gyp isn't consistently linked into better-sqlite's `node_modules` (maybe due to version mismatch with sinal-desktop's node-gyp?)
PATH = " $ P A T H : $ ( p w d ) / . . / . . / . b i n " yarn - - offline build-release
2023-11-14 02:18:28 +00:00
popd
pushd node_modules / @ signalapp/libsignal-client
2023-12-07 13:13:50 +00:00
yarn node-gyp-build
2023-11-14 02:18:28 +00:00
popd
# there are more dependencies which had install/postinstall scripts, but it seems we can safely ignore them
# run signal's own `postinstall`:
2023-12-07 13:13:50 +00:00
yarn build:acknowledgments
yarn patch-package
2023-11-14 02:18:28 +00:00
# yarn electron:install-app-deps # not necessary
2023-11-02 10:24:23 +00:00
runHook postConfigure
2023-11-02 09:10:08 +00:00
'' ;
# excerpts from package.json:
# - "build": "run-s --print-label generate build:esbuild:prod build:release"
# - "generate": "npm-run-all build-protobuf build:esbuild sass get-expire-time copy-components"
# - "build-protobuf": "yarn build-module-protobuf"
# - "build-module-protobuf": "pbjs --target static-module --force-long --no-typeurl --no-verify --no-create --wrap commonjs --out ts/protobuf/compiled.js protos/*.proto && pbts --out ts/protobuf/compiled.d.ts ts/protobuf/compiled.js"
# - "build:esbuild": "node scripts/esbuild.js"
# - "sass": "sass stylesheets/manifest.scss:stylesheets/manifest.css stylesheets/manifest_bridge.scss:stylesheets/manifest_bridge.css"`
# - "get-expire-time": "node ts/scripts/get-expire-time.js"
# - "copy-components": "node ts/scripts/copy.js"
# - "build:esbuild:prod": "node scripts/esbuild.js --prod"
# - "build:release": "cross-env SIGNAL_ENV=production yarn build:electron -- --config.directories.output=release"
# - "build:electron": "electron-builder --config.extraMetadata.environment=$SIGNAL_ENV"
#
# - "build:dev": "run-s --print-label generate build:esbuild:prod"
#
2023-11-02 10:24:23 +00:00
# i can't call toplevel `yarn build` because it doesn't properly forward the `--offline` flags where they need to go.
# instead i call each step individually.
2023-11-02 09:10:08 +00:00
buildPhase = ''
runHook preBuild
2023-11-05 14:49:40 +00:00
2023-11-05 20:03:38 +00:00
# allow building with different node version than what upstream package.json requests
# (i still use the same major version)
2023-11-14 02:18:28 +00:00
# echo 'ignore-engines true' > .yarnrc
2023-11-05 20:03:38 +00:00
2023-11-02 09:10:08 +00:00
# yarn generate:
2023-12-07 13:13:50 +00:00
yarn build-module-protobuf - - offline - - frozen-lockfile
yarn build:esbuild - - offline - - frozen-lockfile
yarn sass
yarn get-expire-time
yarn copy-components
2023-11-02 09:10:08 +00:00
2023-12-07 13:13:50 +00:00
yarn build:esbuild:prod - - offline - - frozen-lockfile
2023-11-02 09:10:08 +00:00
2023-12-07 13:13:50 +00:00
yarn build:release \
2023-11-15 05:50:23 +00:00
- - linux - - $ { hostNpmArch } \
2023-11-15 22:40:13 +00:00
- c . electronDist = $ { electron' } /libexec/electron \
- c . electronVersion = $ { electron' . version } \
2023-11-02 10:24:23 +00:00
- - dir
2023-11-02 09:10:08 +00:00
runHook postBuild
'' ;
installPhase = ''
runHook preInstall
# directory structure follows the original `signal-desktop` nix package
2023-11-15 05:50:23 +00:00
mkdir - p $ out/lib
cp - R release/linux $ { crossNpmArchExt } - unpacked $ out/lib/Signal
2023-11-05 14:49:40 +00:00
# cp -R release/linux-unpacked/resources $out/lib/Signal/resources
# cp -R release/linux-unpacked/locales $out/lib/Signal/locales
2023-11-02 09:10:08 +00:00
2023-11-05 14:49:40 +00:00
mkdir $ out/bin
2023-11-02 09:10:08 +00:00
runHook postInstall
'' ;
2023-12-03 12:18:55 +00:00
preFixup = ''
2023-12-07 13:00:18 +00:00
# fixup the app.asar to use host nodejs
$ { buildPackages . asar } /bin/asar extract $ out/lib/Signal/resources/app.asar unpacked
rm $ out/lib/Signal/resources/app.asar
patchShebangs - - host - - update unpacked
$ { buildPackages . asar } /bin/asar pack unpacked $ out/lib/Signal/resources/app.asar
2023-12-03 12:59:15 +00:00
# XXX: add --ozone-platform-hint=auto to make it so that NIXOS_OZONE_WL isn't *needed*.
# electron should auto-detect x11 v.s. wayland: launching with `NIXOS_OZONE_WL=1` is an optional way to force it when debugging.
# xdg-utils: needed for ozone-platform-hint=auto to work
# else `LaunchProcess: failed to execvp: xdg-settings`
2023-12-03 12:18:55 +00:00
makeShellWrapper $ { electron' } /bin/electron $ out/bin/signal-desktop \
" ' ' ${ gappsWrapperArgs [ @ ] } " \
- - add-flags $ out/lib/Signal/resources/app.asar \
2023-12-03 12:59:15 +00:00
- - suffix PATH : $ { lib . makeBinPath [ xdg-utils ] } \
- - add-flags - - ozone-platform-hint = auto \
2023-12-03 12:18:55 +00:00
- - add-flags " \' ' ${ NIXOS_OZONE_WL : + \ '' ${ WAYLAND_DISPLAY : + - - ozone-platform = wayland - - enable-features = WaylandWindowDecorations } } " \
- - inherit-argv0
'' ;
2023-11-30 09:58:25 +00:00
passthru = {
# inherit bettersqlitePatch signal-fts5-extension;
updateScript = gitUpdater {
# TODO: prevent update to betas
rev-prefix = " v " ;
} ;
2023-12-07 13:00:18 +00:00
nodejs = nodejs' ;
buildYarn = buildYarn ;
buildNodejs = buildNodejs ;
2023-11-30 09:58:25 +00:00
} ;
2023-11-02 15:52:23 +00:00
2023-11-02 09:10:08 +00:00
meta = {
description = " P r i v a t e , s i m p l e , a n d s e c u r e m e s s e n g e r " ;
longDescription = ''
Signal Desktop is an Electron application that links with your
" S i g n a l A n d r o i d " or " S i g n a l i O S " app .
'' ;
homepage = " h t t p s : / / s i g n a l . o r g / " ;
changelog = " h t t p s : / / g i t h u b . c o m / s i g n a l a p p / S i g n a l - D e s k t o p / r e l e a s e s / t a g / v ${ version } " ;
license = lib . licenses . agpl3Only ;
} ;
}