claymager/idris2-pkgs

'Prelude not found' when building different backends.

Closed this issue · 2 comments

Following the Idris2 backend tutorial, running

$ ./build/exec/lazy-idris2

fails with error:

Uncaught error: Error: Module Prelude not found

This is because the executable new executable expects to find them in the standard prefix ~/.idris2. (Or should, if idris2api is patched correctly.)

As a dirty hack, you can cp $(which idris2) into your build directory, and fix change the second code line to point to lazy-idris2 instead of the nix store .idris2-wrapped_.

I've added wrap-idris-libs; just prefix the original command with that.

$ wrap-idris-libs ./build/exec/lazy-idris2 --cg lazy Hello.idr -o hello
I'd rather not.
$

Closed. Use _builders.useRuntimeLibs or log in packageSet.nix::needRuntimeLibs.