Hey folks - I'm gonna spend like 35min setting up Roc on a NixOS machine and trying out AoC day 1. If anyone wants to tag along - feel free to join me :)
This might be a good start https://github.com/roc-lang/roc/blob/main/BUILDING_FROM_SOURCE.md
@John Murray found a new approach you could try out:
nix-shell -p steam-run
steam-run <downloaded-roc-binary>
No need to build from source anymore :)
I also patched the binary myself for AoC: https://gitlab.com/arkandos/aoc/-/blob/2023/flake.nix?ref_type=heads
The hashes might be wrong since the last nightly update, but that's an easy fix :smile:
Some excerpts from my vscode setup from configuration.nix (for 23.05):
configuration.nix parts
hitting my head against the wall in public by trying out random paths quickly :sweat_smile:
decide to prep things better upfront so I can have Roc running on my NixOS (maybe after lining things up I can do it on camera just for the sake of it)
managed to get everything working in 10min after not doing it in public :) (building from source was pretty straightforward on nixos tbh...)
I'm planning on adding a dedicated NixOS section to https://www.roc-lang.org/install to make things easier in the future.
The steam run approach is great to try it out
If you want to include roc in a flake (which builds from source) i have this example https://github.com/JRMurr/AdventOfCode2023/blob/main/flake.nix
which sets up the lsp for https://github.com/ivan-demchenko/roc-vscode-unofficial via export ROC_LSP_PATH=${rocFull}/bin/roc_ls
here's a first: @Loris Cro solving Advent of Code in both Roc and Zig on stream! :smiley:
https://twitter.com/croloris/status/1732074738611089562
Cool :)
Hey, I'm streaming solving day 8 with Roc ^^
Last updated: Jul 06 2025 at 12:14 UTC