Last active
August 29, 2015 14:20
-
-
Save shaicoleman/ed76656836d5112e2409 to your computer and use it in GitHub Desktop.
Nim install script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo Installing dependencies... | |
# APT based systems. Tested on: Ubuntu 14.04 | |
[[ -f /etc/debian_version ]] && sudo apt-get update | |
[[ -f /etc/debian_version ]] && sudo apt-get -y install git mercurial curl build-essential libzip-dev | |
# RPM based systems. Tested on: CentOS 7 | |
[[ -f /etc/redhat-release ]] && [[ -x /usr/bin/sudo ]] || yum -y install sudo | |
[[ -f /etc/redhat-release ]] && sudo yum -y groupinstall "Development Tools" --exclude=subversion --exclude='systemtap*' --exclude=valgrind | |
[[ -f /etc/redhat-release ]] && sudo yum -y install libzip-devel zlib-devel git mercurial | |
cd /tmp | |
[[ -d /tmp/Nim ]] && rm -rf /tmp/Nim | |
echo Cloning from git the Nim devel branch... | |
git clone -b devel git://github.com/Araq/Nim.git | |
cd /tmp/Nim | |
# known good version: 0.10.3 devel version, 2015-04-26 | |
git checkout 1cb14f888a4534d8e71f1fb9a64ba172558e138e | |
echo Cloning from git the Nim csources devel branch... | |
git clone -b devel --depth 1 git://github.com/nim-lang/csources | |
cd csources | |
echo Building the csources | |
sh build.sh | |
cd .. | |
echo Building koch | |
bin/nim c koch | |
echo Booting koch | |
./koch boot -d:release | |
echo Installing koch | |
sudo ./koch install /usr/local | |
sudo ln -sf /usr/local/nim/bin/nim /usr/local/bin/nim | |
git clone https://github.com/nim-lang/nimble.git | |
cd nimble | |
nim c -r src/nimble install | |
sudo cp /tmp/Nim/nimble/src/nimble /usr/local/nim/bin/nimble | |
sudo ln -sf /usr/local/nim/bin/nimble /usr/local/bin/nimble | |
nimble update | |
nimble install random | |
nimble install strfmt@#devel | |
nimble install nake | |
nimble install sha1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment