nim.sh 644 B

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