When I run idris I get the following message:
Can't find import Builtins
Can't find import Prelude
____ __ _
/ _/___/ /____(_)____
/ // __ / ___/ / ___/ Version 1.2.0
_/ // /_/ / / / (__ ) http://www.idris-lang.org/
/___/\__,_/_/ /_/____/ Type :? for help
Idris is free software with ABSOLUTELY NO WARRANTY.
For details type :warranty.
The crucial part is the first two lines, which means that I don't have the ability to actually use any of standard library (e.g. 1 + 1 fails out).
This appears to be something akin to #7014 popping up again.
It also looks like asking Idris to list the available libraries blows up.
idris --listlibs
Uncaught error: /nix/store/y75ay6zfi5l20zkqnld1q81zw0arsfbg-idris-1.2.0-data/share/ghc-8.2.2/x86_64-linux-ghc-8.2.2/idris-1.2.0/libs/: getDirectoryContents:openDirStream: does not exist (No such file or directory)
Install the haskellPackages.idris package. Then run idris from the command line. You should see the Can't find import Builtins... message.
Please run nix-shell -p nix-info --run "nix-info -m" and paste the
results.
- system: `"x86_64-linux"`
- host os: `Linux 4.9.75, NixOS, 18.03.git.3a763b9 (Impala)`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 1.11.16`
- channels(root): `""`
- nixpkgs: `/etc/nixos/nixpkgs`
Note that version of nixpkgs being used is in the host os name, 3a763b91963ef747b188e7062d7a02119d2ef6d3
Can confirm, same behavior on my machine, not sure on what causes this yet.
This is a me-too
"x86_64-linux"Linux 4.4.0-112-generic, Ubuntu, 16.04.3 LTS (Xenial Xerus)nononix-env (Nix) 1.11.16"nixpkgs-18.03pre128510.c64639b54ca"/home/ubuntu/.nix-defexpr/channels/nixpkgsI can confirm this as well. Anybody got an idea how we could go and fix this?
I had this issue too. Just installing idris as a haskell package doesn't add the libraries - strace shows it checking for a lib directory which doesn't exist. I reinstalled my haskell packages without idris and then ran
nix-env -f "<nixpkgs>" -i idris
and it now works (it no longer gives that error message and I can see functions from the prelude in the repl). My nixpkgs is at 26db7314.
I noticed there were some commits related to refactoring idris modules earlier this year, which may be related.
Oh that's interesting... so idris is now a top-level package? Yeah If just install idris instead of haskellPackages.idris everything works fine. I don't know if it's a priority to make haskellPackages.idris actually work, but just installing idris is fine for me, so I'm willing to close this issue if this is a known way of how haskellPackages is supposed to work.
install idris instead of haskellPackages.idris
Works for me, thanks!
Most helpful comment
I had this issue too. Just installing idris as a haskell package doesn't add the libraries - strace shows it checking for a
libdirectory which doesn't exist. I reinstalled my haskell packages without idris and then ranand it now works (it no longer gives that error message and I can see functions from the prelude in the repl). My nixpkgs is at 26db7314.
I noticed there were some commits related to refactoring idris modules earlier this year, which may be related.