diff --git a/flake.nix b/flake.nix index 2bfb9fe18..2bfbd8540 100644 --- a/flake.nix +++ b/flake.nix @@ -41,6 +41,12 @@ # - --no-sandbox # - --no-zygote (fixes Zygote could not fork: process_type gpu-process numfds 3 child_pid -1) # - --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 = { 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-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. # 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 link-caches yarn install --frozen-lockfile yarn generate yarn build:esbuild:prod 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 { devShells.default = with pkgs; mkShell { @@ -164,7 +185,8 @@ link-caches patch-interpreter patch-signal - reproducible + reproducible0 + reproducible1 # yarn (yarn.override { nodejs = nodejs_18_15_0; })