Packaging Nim

This page provide hints on distributing Nim using OS packages.

See distros for tools to detect Linux distribution at runtime.

See here for how to compile reproducible builds.

Supported architectures

Nim runs on a wide variety of platforms. Support on amd64 and i386 is tested regularly, while less popular platforms are tested by the community.

The following platforms are seldomly tested:

Packaging for Linux

See https://github.com/nim-lang/Nim/labels/Installation for installation-related bugs.

Build Nim from the released tarball at https://nim-lang.org/install_unix.html It is different from the GitHub sources as it contains Nimble, C sources & other tools.

The Debian package ships bash and ksh completion and manpages that can be reused.

Hints on the build process:

# build from C sources and then using koch
make -j   # supports parallel build
# alternatively: ./build.sh --os $os_type --cpu $cpu_arch
./bin/nim c -d:release koch
./koch boot -d:release

# optionally generate docs into doc/html
./koch docs

./koch tools

# extract files to be really installed
./install.sh <tempdir>

# also include the tools
for fn in nimble nimsuggest nimgrep; do cp ./bin/$fn <tempdir>/nim/bin/; done

What to install: