this post was submitted on 08 Mar 2024
0 points (NaN% liked)

NixOS

992 readers
1 users here now

NixOS is a Linux distribution built on top of the Nix package manager. Its declarative configuration allows reliable system upgrades via several official channels of stability and size.

This community discusses NixOS, Nix, and everything related.

founded 1 year ago
MODERATORS
 

cross-posted from: https://infosec.pub/post/9428674

I had the (perhaps foolishly ambitious) idea of creating a rolling fork of Lemmy with the intent of modifying the codebase for use in an open source pub sub implementation of retail inventory. But I have to get standard Lemmy working first...and I like to use Nix for everything I do in the dev world (where feasible).

So, I forked the repo and was immediately brought into dev environment hell.

They only offer a choice between:

A.) Docker B.) Ansible C.) Building from scratch.

Two hours of fighting with the scratch build instructions and I eventually had to admit defeat due to some vague dependencies (and general malaise). Though I have completely flakified my Purescript and Haskell dev environments, I have found Rust to be a lot more challenging even on simple projects.

Anyway, I decided to come here to ask: **How easy would it be to flakify the Lemmy repo to add a fourth build option for those of us in the Nix world? **

Can I reference the build instructions from nixpkgs to get close to my intended goal? I need all of the help I can get. Be as pedantic or defeatist as you will. I currently have no skin in this game and merely want to help the Lemmy devs welcome people that are more nixy like myself (if nothing else).

top 2 comments
sorted by: hot top controversial new old
[–] [email protected] 0 points 7 months ago (1 children)

I've been doing lots of Rust & Nix work, maybe I can provide some helpful information.

I wrote a guide on setting up a dev shell, https://nixlang.wiki/en/nix/how-to/development-environment-for-rust

I've been working on a guide for building Rust binaries. I haven't gotten around to finishing it, so I'll share a draft, https://gist.github.com/hallettj/870a697f48d2306915a5215208c80488

[–] [email protected] 0 points 7 months ago

Thanks! I need all the help I can get. I’ll edit this comment when I’m feeling less burned out by my failures yesterday.