`discord-development` linux tarball changed layout in 0.0.235,
`discord-canary` followed in 1.0.927, and `discord-ptb` followed in
1.0.188
Instead of bundling the channel binary directly, these channels now ship
only a small `updater_bootstrap` ELF that downloads the real app into
`$XDG_CONFIG_HOME/<channel>/app-<version>/` on first run
That bootstrap always hits `/manifests/latest` with no way to pin a
version, which would make the build impure and the nix version a lie
Reverse engineering the Rust ELF confirmed there is no CLI flag, env
var, or config to override this
First seen downstream in FlameFlag/nixcord workflow run 24025186671
Fetch the brotli-compressed `.distro` tars directly from the
distributions API at build time instead
`update.py` resolves the latest version via
`updates.discord.com/distributions/app/manifests/latest?channel=<ch>`
and pins the host + all module URLs with SHA256s into `sources.json`
`installPhase` detects the distro layout via `isDistro`, brotli-decodes
the host tar into `$out/opt/<binaryName>`, and extracts each module
under `$out/opt/<binaryName>/modules/<name>/`. `autoPatchelfHook`
handles the binary and native `.node` modules as usual
Discord's JS `moduleUpdater` looks for modules under
`<host_dir>/<version>/modules/<name>/`
A `stageModules` wrapper symlinks them from the nix store on first
launch and pre-writes `installed.json` so the updater treats them as
already installed, otherwise the first launch crashes with `Cannot find
module 'discord_desktop_core'`
The bundled native modules link against openssl 1.1 and libpulseaudio,
added both to `buildInputs` gated on `isDistro` so the legacy stable
package is unaffected
1.0.1 is the cli side of upstream's breaking api-core 5.x line ("Pcap
groundwork"); its debian/control raises the build-time api-core pin
to (>= 5.0.0).
Required by proton-vpn-gtk-app 4.15.3 and proton-vpn-cli 1.0.1, which
pin api-core (>= 5.0.0) in debian/control. 5.0.0 is upstream's
breaking release ("Packet capture groundwork"); 5.0.1 is the
stabilising patch. install_requires and the killswitch_connection_handler
postPatch target are unchanged from 4.19.x.