lemmy icon indicating copy to clipboard operation
lemmy copied to clipboard

Add the initial devenv

Open farcaller opened this issue 2 years ago • 2 comments

This adds a basic nix-themed dev shell for lemmy development flow (and is otherwise a noop if you don't have nix in your OS).

It can build the package, however the nix build itself is broken (due to submodules). It's not a critical feature, though.

Also adds the postgres into the shell, to support straight-on lemmy development.

The rust toolchain is frozen at stable, which is enough to build lemmy at the time of writing.

farcaller avatar Jul 02 '23 14:07 farcaller

Not sure about the CI failure as it's in the file I didn't touch.

farcaller avatar Jul 02 '23 15:07 farcaller

Would be good if someone who is familiar with nix could review this.

Nutomic avatar Jul 03 '23 09:07 Nutomic

This adds a ton of nixOS specific stuff into the code base, and none of the main developers use it. Wouldn't these additions be better suited to a fork, or a new project that handles nixOS specifically?

We already have Lemmy packaged in NixOS and Nixpkgs, this is a development environment, while a development environment can live outside of the repo, it may defeat the purpose of this PR to do so, I imagine.

I personally don't commit my Nix development environments to the upstreams whom I work with except they are already using Nix mostly.

RaitoBezarius avatar Jul 12 '23 12:07 RaitoBezarius

That's fair. My reasoning was that it was easier to have specific rust dependencies and to have a sidecar postgres in the shell (given lemmy doesn't work without postgres at all), but it's fair that you can just use docker compose for it all.

farcaller avatar Jul 12 '23 13:07 farcaller