packaging.rst 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. =============
  2. Packaging Nim
  3. =============
  4. This page provide hints on distributing Nim using OS packages.
  5. See `distros <distros.html>`_ for tools to detect Linux distribution at runtime.
  6. Supported architectures
  7. -----------------------
  8. 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.
  9. - amd64
  10. - arm64 (aka aarch64)
  11. - armel
  12. - armhf
  13. - i386
  14. - m68k
  15. - mips64el
  16. - mipsel
  17. - powerpc
  18. - ppc64
  19. - ppc64el (aka ppc64le)
  20. - riscv64
  21. The following platforms are seldomly tested:
  22. - alpha
  23. - hppa
  24. - ia64
  25. - mips
  26. - s390x
  27. - sparc64
  28. Packaging for Linux
  29. -------------------
  30. See https://github.com/nim-lang/Nim/labels/Installation for installation-related bugs.
  31. Build Nim from the released tarball at https://nim-lang.org/install_unix.html
  32. It is different from the GitHub sources as it contains Nimble, C sources & other tools.
  33. The Debian package ships bash and ksh completion and manpages that can be reused.
  34. Hints on the build process:
  35. ::
  36. # build from C sources and then using koch
  37. ./build.sh --os $os_type --cpu $cpu_arch
  38. ./bin/nim c koch
  39. ./koch boot -d:release
  40. # optionally generate docs into doc/html
  41. ./koch docs
  42. ./koch tools -d:release
  43. # extract files to be really installed
  44. ./install.sh <tempdir>
  45. # also include the tools
  46. for fn in nimble nimsuggest nimgrep; do cp ./bin/$fn <tempdir>/nim/bin/; done
  47. What to install:
  48. - The expected stdlib location is /usr/lib/nim
  49. - Global configuration files under /etc/nim
  50. - Optionally: manpages, documentation, shell completion
  51. - When installing documentation, .idx files are not required
  52. - The "compiler" directory contains compiler sources and should not be part of the compiler binary package