actually build a standalone executable (runnable outside of yarn)
This commit is contained in:
28
flake.nix
28
flake.nix
@@ -41,6 +41,12 @@
|
|||||||
# - --no-sandbox
|
# - --no-sandbox
|
||||||
# - --no-zygote (fixes Zygote could not fork: process_type gpu-process numfds 3 child_pid -1)
|
# - --no-zygote (fixes Zygote could not fork: process_type gpu-process numfds 3 child_pid -1)
|
||||||
# - --disable-gpu
|
# - --disable-gpu
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# debugging notes
|
||||||
|
# `./node_modules/.bin/electron .` is reading `./package.json`.
|
||||||
|
# - dependent on: "main": "app/main.js"
|
||||||
|
# app/main.js is generated (from app/main.ts, checked into git)
|
||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "nixpkgs/nixos-unstable";
|
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||||
@@ -142,16 +148,31 @@
|
|||||||
mkdir cache-electron ; rm -rf ~/.cache/electron ; ln -s $(pwd)/cache-electron ~/.cache/electron
|
mkdir cache-electron ; rm -rf ~/.cache/electron ; ln -s $(pwd)/cache-electron ~/.cache/electron
|
||||||
mkdir cache-ms-playwright ; rm -rf ~/.cache/ms-playwright ; ln -s $(pwd)/cache-ms-playwright ~/.cache/ms-playwright
|
mkdir cache-ms-playwright ; rm -rf ~/.cache/ms-playwright ; ln -s $(pwd)/cache-ms-playwright ~/.cache/ms-playwright
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# run this to clean state, and then build + run Signal in a way which i know WORKS.
|
# run this to clean state, and then build + run Signal in a way which i know WORKS.
|
||||||
# you should land at the Signal pairing screen at the end of the command.
|
# you should land at the Signal pairing screen at the end of the command.
|
||||||
reproducible = with pkgs; writeShellScriptBin "reproducible" ''
|
reproducible0 = with pkgs; writeShellScriptBin "reproducible0" ''
|
||||||
clean
|
clean
|
||||||
link-caches
|
link-caches
|
||||||
yarn install --frozen-lockfile
|
yarn install --frozen-lockfile
|
||||||
yarn generate
|
yarn generate
|
||||||
yarn build:esbuild:prod
|
yarn build:esbuild:prod
|
||||||
patch-interpreter node_modules/electron/dist/electron
|
patch-interpreter node_modules/electron/dist/electron
|
||||||
yarn start
|
# yarn start
|
||||||
|
./node_modules/.bin/electron . # equiv to `yarn start`
|
||||||
|
'';
|
||||||
|
reproducible1 = with pkgs; writeShellScriptBin "reproducible1" ''
|
||||||
|
clean
|
||||||
|
link-caches
|
||||||
|
yarn install --frozen-lockfile
|
||||||
|
yarn generate
|
||||||
|
yarn build:esbuild:prod
|
||||||
|
patch-interpreter node_modules/electron/dist/electron
|
||||||
|
# this fails because it tries to also build the deb -- but we don't need that!
|
||||||
|
yarn build:release || true
|
||||||
|
patch-interpreter release/linux-unpacked/signal-desktop
|
||||||
|
|
||||||
|
echo "launch signal with: ./release/linux-unpacked/signal-desktop"
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
devShells.default = with pkgs; mkShell {
|
devShells.default = with pkgs; mkShell {
|
||||||
@@ -164,7 +185,8 @@
|
|||||||
link-caches
|
link-caches
|
||||||
patch-interpreter
|
patch-interpreter
|
||||||
patch-signal
|
patch-signal
|
||||||
reproducible
|
reproducible0
|
||||||
|
reproducible1
|
||||||
|
|
||||||
# yarn
|
# yarn
|
||||||
(yarn.override { nodejs = nodejs_18_15_0; })
|
(yarn.override { nodejs = nodejs_18_15_0; })
|
||||||
|
Reference in New Issue
Block a user