Error when compiling/running Idris program

I am going through Type-Driven Development with Idris. I have just written the Hello World program and they tell you to boot up the Idris repl and run :exec. When doing this, I am getting a couple errors. The full output can be found in this gist. I have tried doing this in a “normal” shell, as well as using nix-shell -p 'idris'. I get the same error in both scenarios.

Would anyone be able to point me in a direction that could help me get Idris working on NixOS?

It looks like you might need to add gmp to your nix-shell invocation.

That seems to have done it. Do you know if there is a way to do it without having to enter a nix-shell? Preferably I would be able to just install the idris package and be able to do this.

Sorry for my late reply.

I suspect you can create your own package that includes Idris and GMP as buildInputs, then uses wrapProgram on the Idris executable to export a copy of it that has the GMP library in its LD_LIBRARY_PATH.

Unfortunately, I have only the slipperiest grasp on how to actually do this. I hope someone else can come in and educate both of us.

The stopgap way to do this that I understand better is simply to create a shell script that runs nix-shell as you did earlier, and passes along any extra command line argument, to make your own poor man’s wrapper script.