lightningrodlabs / moss

Creating group coherence with holochain apps
https://theweave.social
21 stars 5 forks source link

`we-dev-cli` does not work on NixOS #19

Open guillemcordoba opened 5 months ago

guillemcordoba commented 5 months ago

When I try to run we-dev-cli on NixOS, I get this error:

Could not start dynamically linked executable: /home/guillem/projects/lrl/notebooks/node_modules/electron/dist/electron
NixOS cannot run dynamically linked executables intended for generic
linux environments out of the box. For more information, see:
https://nix.dev/permalink/stub-ld

This is because NixOS does not allow non-nix executables to be run. I don't really know what would be the best approach here...

For now I guess I can test using my ubuntu laptop.

matthme commented 5 months ago

Hmm...okay. You can always run the CLI from the AppImage that's just not using the latest version.

matthme commented 5 months ago

It looks like electron is available as a NixOS package so there would probably be a way to run it that way. Maybe I could just add a flag to the CLI to use a global electron binary and you can add the electron binary to the flake.nix?

matthme commented 5 months ago

If you update to @lightningrodlabs/we-dev-cli@0.11.4 you can add the ELECTRON_BINARY environment variable, e.g.

ELECTRON_BINARY=my/electron/binary/from/nix/package we-dev-cli [...]
guillemcordoba commented 5 months ago

Exactly the right approach, thanks @matthme