packaging.rst 1.9 KB

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