mikedilger / gossip

Gossip is a nostr client
Other
627 stars 74 forks source link

feat: simple nix flake for developer environment #763

Closed Kodylow closed 1 month ago

Kodylow commented 1 month ago

This is a simplified nix flake to create a reproducible dev environment across systems (including m2 macs) for gossip.

Uses flakebox for cross compilation but suppresses the flakebox inits for adding any of the workflows, formatting, and git fanciness.

If you've never used nix, the best installer is determinate systems (comes with flakes, commands, and better mac support):

curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install

or the normal nix installer at https://nixos.org/download/ (enable flakes and commands in the config)

If you have nix installed you'd just clone gossip down and run from the root directory

nix develop

and it'll install all the correct versions for rust, dependencies, other binaries to build gossip on whatever system you're running and put you into a nix dev shell using those correct binaries. (No "which system are you on, do you have the dependencies installed, etc)

In future this flake can be built off of to do more nix-y things and a bunch of other flakebox fanciness but all this PR does is the nix developer environment.

mikedilger commented 1 month ago

I moved this to unstable. We don't merge into master directly, but I forgot to change the base of this PR so I forced pushed master back.

Kodylow commented 1 month ago

tracking, will PR to unstable in future, thanks!