Here is my modified formula
https://gist.github.com/scicalculator/5642055

The error that I was getting is this:
https://gist.github.com/scicalculator/e445c6c3540fb41a4773

If I comment out the `readline` dependency I get a successful installation that appears to open a REPL for `torch`
https://gist.github.com/scicalculator/b95dc900fe7005c28dd3

---
Interesting, so I commented out all of the dependencies and it installed just fine (without gcc). However, it seems like it might be building it's own copy of gnuplot, but I haven't checked carefully. I just hope it doesn't build it's own gnuplot everytime.