Stream: beginners

Topic: Using with `nix run`


view this post on Zulip Lukas Hermann (Dec 02 2023 at 02:58):

Hi all, it's completely possible that I'm just holding it wrong, but I tried nix run github:roc-lang/roc and got:

error: unable to execute '/nix/store/m0b9b49smkgp01rffx63g5brwl5hw7hd-roc_cli-0.0.1/bin/roc_cli': No such file or directory

I'm not sure if this is a nix issue or a Roc issue though. Any help would be appreciated :)

view this post on Zulip John Murray (Dec 02 2023 at 02:59):

Lukas Hermann said:

Hi all, it's completely possible that I'm just holding it wrong, but I tried nix run github:roc-lang/roc and got:

error: unable to execute '/nix/store/m0b9b49smkgp01rffx63g5brwl5hw7hd-roc_cli-0.0.1/bin/roc_cli': No such file or directory

I'm not sure if this is a nix issue or a Roc issue though. Any help would be appreciated :)

ahh im 99% sure its a nix issues since i think nix run expects the attr set key to be the same as the binary in the store path

view this post on Zulip John Murray (Dec 02 2023 at 03:00):

looks like we need to either set meta.mainProgram or maybe simpler set an app output https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-run

view this post on Zulip Lukas Hermann (Dec 02 2023 at 03:01):

Ah I see, thanks! It's definitely nifty for trying out programs

view this post on Zulip John Murray (Dec 02 2023 at 03:07):

I agree! I created https://github.com/roc-lang/roc/issues/6148#issue-2021828609

view this post on Zulip Lukas Hermann (Dec 02 2023 at 03:07):

Thanks! :)


Last updated: Jul 06 2025 at 12:14 UTC