Stream: beginners

Topic: roc nix flake


view this post on Zulip Drewry Pope (Nov 02 2025 at 21:04):

hi roc friends, i looked at the couple previous nix flake topics but i think this is newer..

is there an updated flake somewhere with an in-support rust version OR a zig-only version?

i'm all good with nightly builds, closer to master the better, preferably with a flake to depend on. is this possible right now? should i make some sort of hashed binary derivation instead?

view this post on Zulip Drewry Pope (Nov 02 2025 at 21:06):

(1.77.2 is eol i think, by default i try to run just a single nixpkgs when possible. i could go ahead and use the roc flake as-is without following my nixpkgs from 2025, but wanted to check first. maybe it's better if i don't rely on this flake for now, add my own derivation directly in my repo?)

view this post on Zulip Anton (Nov 04 2025 at 09:29):

Hi @Drewry Pope,

is there an updated flake somewhere with an in-support rust version

No, I have not updated the rust version so I can focus on getting the new compiler ready.

OR a zig-only version?

Yes: https://github.com/roc-lang/roc/blob/main/src/flake.nix. But, it is not ready to replace the old compiler yet.

view this post on Zulip Anton (Nov 04 2025 at 09:29):

i could go ahead and use the roc flake as-is without following my nixpkgs from 2025

That would be the approach I recommend.

view this post on Zulip Hannes (Nov 05 2025 at 01:41):

I noticed that the flake for the new Zig compiler doesn't define any output packages, is there a technical reason for that or is it just a lower priority thing?

view this post on Zulip Anton (Nov 05 2025 at 08:36):

Yeah, lower priority

view this post on Zulip Hannes (Nov 05 2025 at 09:12):

Cool, because that means I can open a PR for my local branch where I've added it :sweat_smile:

view this post on Zulip Hannes (Nov 05 2025 at 10:27):

It's open here: https://github.com/roc-lang/roc/pull/8351

view this post on Zulip Anton (Nov 05 2025 at 11:57):

Thanks, I'll check it out :)

view this post on Zulip Anton (Nov 05 2025 at 12:17):

Hmm, this is going very slowly for me:

❯ nix run ./src/#roc
warning: Git tree '/Users/username/gitrepos/forks/hasnep/roc' is dirty
[1/0/1 built] building roc (buildPhase): install -C .zig-cache/o/63519b81310eced5835dbe3ca5ae69cd/roc /nix/var/nix/builds/nix-9378-2989836767/5lsb292nlfn65p09g6aqlfz2bdbsq44h-source/zig-out/bin/roc

But when I look in activity monitor it's not using much CPU or memory at all

view this post on Zulip Georges Boris (Jan 26 2026 at 13:38):

Hey folks - anyone using the new compiler with nix flakes?
I noticed there is an open PR but seems inactive.

IIRC Anton used nix flakes for roc development, right? Do you have any working setup available?

view this post on Zulip Rick Hull (Jan 26 2026 at 13:42):

Georges, i used to run nixos and I used to do nix flake for some project setup, but I abandoned this approach for a moment. So i may be able to help a little, maybe not. But have you seen https://github.com/rickhull/roc-init ?

view this post on Zulip Anton (Jan 26 2026 at 13:51):

Georges Boris said:

Hey folks - anyone using the new compiler with nix flakes?
I noticed there is an open PR but seems inactive.

IIRC Anton used nix flakes for roc development, right? Do you have any working setup available?

Hi Georges :) we already have a new compiler flake, use it with 'nix develop ./src'

view this post on Zulip Hannes (Jan 26 2026 at 13:55):

Georges Boris said:

I noticed there is an open PR but seems inactive.

That PR will become active again next week when I quit my job and have more time to work on Roc again :sweat_smile:

view this post on Zulip Rick Hull (Jan 26 2026 at 13:56):

https://github.com/roc-lang/roc/blob/main/src/flake.nix # cool

view this post on Zulip Eli Dowling (Jan 26 2026 at 14:52):

Oh and you should know that it seems like you need to run tests from the top level '/'. So I always run nix develop from in /src then go back to / and run zig build test

view this post on Zulip Hannes (Jan 26 2026 at 23:56):

You should be able to run nix develop ./src to use the flake in the src directory


Last updated: Feb 20 2026 at 12:27 UTC