In which I take a good look at logseq-NG

Jeremy List

Closing Note

I probably won’t do anything further with this particular project because the AWS optional dependencies for Electron seem to no longer be on by default in nixpkgs-unstable. The following is preserved for posterity.

The Circumstances

A while ago I installed NixOS on my computer and since then it’s been my main Linux distribution. Since I really like Logseq it was one of the early additions to my Home Manager configuration.

Not long after that I was doing a routine rebuild and noticed that the list of things being copied included several items with names beginning with aws; including aws-sdk-cpp. After some investigation I found that it was an optional dependency of the Nix package manager and I could turn it off by passing useAWS = false; to that derivation. However, the depth of my distrust of Amazon drove me to go a bit further than a one-off override so I whipped up this little overlay:

final: prev: {
  withAWS = false;
}

This has mostly solved the problem of unwanted AWS stuff on my computer although occasionally something I run in nix-shell still brings it in. Unfortunately one of the packages affected by this is electron_27 which Logseq uses to make its user-interface exist. More unfortunately having electron_27 without aws-sdk-cpp means I’m not getting Electron from the NixOS cache; which was fine in the case of small things like Nix itself but is a bit more unfortunate for something that takes my computer over 30 hours to compile! However, the annoyance was finite and I mostly avoided it by setting up a timer to start my Home Manager updates/rebuilds on Friday evenings when I was unlikely to be using my computer for a while. Actually I had a second timer which updated <nixpkgs> every morning so I’d have more up-to-date packages when I ran nix-shell but still only rebuild Home Manager once a week. This ended up being the cause of my next problem.

I came across a thread on Mastodon that inspired feelings of nostalgia about the multi-protocol instant messaging program Pidgin, so I added that to my Home Manager configuration and triggering a Home Manager rebuild. A rebuild that is still in progress as I’m writing this because either Electron or one of its dependencies had been updated in nixpkgs since my last weekly rebuild.

After complaining about this on Mastodon and proposing a Logseq fork based on Tauri someone mentioned that there had been an experimental one a few years ago here.

That’s been abandoned for a while, most likely because Andelf never set up his computer to compile Chromium on a regular basis. But I decided to take it for a spin and see where I end up. Also: I’m something of a Haiku enthusiast and I believe my chances of getting Tauri running on Haiku are much better than is the case for Electron.

My Progress So Far

2nd of May 2024

I cloned the repo and wrote a shell.nix, and after a few additions I got it compiling. As of Midday I have it showing a blank white rectangle on my screen and a bunch of complaints about missing files in the terminal window I launched it from. I suspect I need to change where it looks for those files.