chris-montero / terra

A sane application development framework for the desktop.
116 stars 5 forks source link

Add a shell.nix to setup dev enviroment and compile on nixos #3

Closed NikolasDaynard closed 2 months ago

NikolasDaynard commented 2 months ago

This is a little build / shell script I whipped up over the last few days. It was a huge pain to manually pass all the environment variables to luarocks, I don't know if there was a better way, but it seemed to not take exported variables. Anyway it's fully functional and well tested.

I opted for a shell environment rather than a default.nix because I had luarocks install locally. I couldn't get luarocks to work globally even with sudo so it needs to set a few lua path variables in order to have luajit find the libraries correctly. Nixos doesn't seem to support / have documentation on global luarocks. This is really a pain on nix without it because I had to find and setup every one of the dependencies manually so it's very nice to have if you're on nixos.

chris-montero commented 2 months ago

Awesome, thanks a lot for your work. I don't have nixos (although I was thinking of trying it out), so I can't test this out, but I'm going to trust that this works.