Re: Nimble broken for pre-built binary installs

2019-12-29 Thread dom96
That's a poor error from Nimble, can you report this as an issue? IMO we need a 
better error message here.


Re: Nimble broken for pre-built binary installs

2019-12-29 Thread wesleyyue
Dumb mistake. I fixed the issue by copying the entire uncompressed directory to 
somewhere and adding nim-1.0.4/bin and ~/.nimble/bin to my PATH as described in 
the install page and that fixed the issue.


Nimble broken for pre-built binary installs

2019-12-28 Thread wesleyyue
I'm trying to write a bazel macro for compiling nim modules. In order to make 
the builds more reproducible, I would like to avoid using choosenim because it 
has an external dependency on the ~/.choosenim/current flag file. I'm trying to 
install an exact version of nim in docker, but it appears that I cannot use 
nimble to install any packages. This is the error I get:


(02:12 AM):~$ docker run -it --rm ubuntu
root@539b4affad2f:/# apt-get update -qq && apt-get install -y curl xz-utils 
git > /dev/null
debconf: delaying package configuration, since apt-utils is not installed
root@539b4affad2f:/# curl -sL 
https://nim-lang.org/download/nim-1.0.4-linux_x64.tar.xz -o 
/tmp/nim-1.0.4-linux_x64.tar.xz && tar -xf /tmp/nim-1.0.4-linux_x64.tar.xz 
-C /tmp/ && cp -r /tmp/nim-1.0.4/bin/* /usr/local/bin && cp -r 
/tmp/nim-1.0.4/lib/* /usr/local/lib && nimble install -y nimpy
Prompt: No local packages.json found, download it from internet? -> 
[forced yes]
Downloading Official package list
Success Package list downloaded.
Downloading https://github.com/yglukhov/nimpy using git
   Tip: 2 messages have been suppressed, use --verbose to show them.
 Error: Could not read package info file in 
/tmp/nimble_3109/githubcom_yglukhovnimpy/nimpy.nimble;
...   Reading as ini file failed with:
... Invalid section: .
...   Evaluating as NimScript file failed with:
... /tmp/nimblecache/nimscriptapi.nim(7, 8) Error: cannot open 
file: strformat
... printPkgInfo() failed.
root@539b4affad2f:/# nim -v
Nim Compiler Version 1.0.4 [Linux: amd64]
Compiled at 2019-11-27
Copyright (c) 2006-2019 by Andreas Rumpf

active boot switches: -d:release
root@539b4affad2f:/# nimble -v
nimble v0.11.0 compiled at 2019-11-27 09:21:44
git hash: couldn't determine git hash


Run

I don't get the same issue if I install nim through choosenim. Any idea how I 
could fix this?

I found this other post from a month ago that may be related. 
[https://forum.nim-lang.org/t/5627#34964](https://forum.nim-lang.org/t/5627#34964)