nim.sh 556 B

12345678910111213141516171819202122232425262728
  1. #!/bin/bash
  2. fw_installed nim && return 0
  3. NIM_VERSION="0.11.2"
  4. NIM_CSOURCES="6bf2282"
  5. fw_get -O https://github.com/nim-lang/Nim/archive/v$NIM_VERSION.tar.gz
  6. fw_untar v$NIM_VERSION.tar.gz
  7. mv Nim-$NIM_VERSION nim
  8. cd nim
  9. git clone git://github.com/nim-lang/csources.git
  10. cd csources
  11. git checkout $NIM_CSOURCES
  12. sh build.sh
  13. cd ..
  14. bin/nim c koch
  15. # bootstrapping nim's compiler
  16. ./koch boot -d:release
  17. echo "export NIM_HOME=${IROOT}/nim" > $IROOT/nim.installed
  18. echo -e "export PATH=\$NIM_HOME/bin:\$PATH" >> $IROOT/nim.installed
  19. source $IROOT/nim.installed