Files
Nim/packaging.html
github-actions[bot] de413ab6bb Deploy to GitHub pages
2025-12-25 20:14:24 +00:00

99 lines
8.2 KiB
HTML

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- This file is generated by Nim. -->
<html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en" lang="en" data-theme="auto">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Packaging Nim</title>
<!-- Google fonts -->
<link href='https://fonts.googleapis.com/css?family=Lato:400,600,900' rel='stylesheet' type='text/css'/>
<link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600' rel='stylesheet' type='text/css'/>
<!-- Favicon -->
<link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAUAAAAF////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAIAAABbAAAAlQAAAKIAAACbAAAAmwAAAKIAAACVAAAAWwAAAAL///8A////AP///wD///8A////AAAAABQAAADAAAAAYwAAAA3///8A////AP///wD///8AAAAADQAAAGMAAADAAAAAFP///wD///8A////AP///wAAAACdAAAAOv///wD///8A////AP///wD///8A////AP///wD///8AAAAAOgAAAJ3///8A////AP///wAAAAAnAAAAcP///wAAAAAoAAAASv///wD///8A////AP///wAAAABKAAAAKP///wAAAABwAAAAJ////wD///8AAAAAgQAAABwAAACIAAAAkAAAAJMAAACtAAAAFQAAABUAAACtAAAAkwAAAJAAAACIAAAAHAAAAIH///8A////AAAAAKQAAACrAAAAaP///wD///8AAAAARQAAANIAAADSAAAARf///wD///8AAAAAaAAAAKsAAACk////AAAAADMAAACcAAAAnQAAABj///8A////AP///wAAAAAYAAAAGP///wD///8A////AAAAABgAAACdAAAAnAAAADMAAAB1AAAAwwAAAP8AAADpAAAAsQAAAE4AAAAb////AP///wAAAAAbAAAATgAAALEAAADpAAAA/wAAAMMAAAB1AAAAtwAAAOkAAAD/AAAA/wAAAP8AAADvAAAA3gAAAN4AAADeAAAA3gAAAO8AAAD/AAAA/wAAAP8AAADpAAAAtwAAAGUAAAA/AAAA3wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAADfAAAAPwAAAGX///8A////AAAAAEgAAADtAAAAvwAAAL0AAADGAAAA7wAAAO8AAADGAAAAvQAAAL8AAADtAAAASP///wD///8A////AP///wD///8AAAAAO////wD///8A////AAAAAIcAAACH////AP///wD///8AAAAAO////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//8AAP//AAD4HwAA7/cAAN/7AAD//wAAoYUAAJ55AACf+QAAh+EAAAAAAADAAwAA4AcAAP5/AAD//wAA//8AAA=="/>
<link rel="icon" type="image/png" sizes="32x32" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4QQQEwksSS9ZWwAAAk1JREFUWMPtll2ITVEUx39nn/O7Y5qR8f05wtCUUr6ZIS++8pEnkZInPImneaCQ5METNdOkeFBKUhMPRIkHKfEuUZSUlGlKPN2TrgfncpvmnntnmlEyq1Z7t89/rf9a6+y99oZxGZf/XeIq61EdtgKXgdXA0xrYAvBjOIF1AI9zvjcC74BSpndrJPkBWDScTF8Aa4E3wDlgHbASaANmVqlcCnwHvgDvgVfAJ+AikAAvgfVZwLnSVZHZaOuKoQi3ZOMi4NkYkpe1p4J7A8BpYAD49hfIy/oqG0+hLomiKP2L5L+1ubn5115S+3OAn4EnwBlgMzCjyt6ZAnQCJ4A7wOs88iRJHvw50HoujuPBoCKwHWiosy8MdfZnAdcHk8dxXFJ3VQbQlCTJvRBCGdRbD4M6uc5glpY3eAihpN5S5w12diSEcCCEcKUO4ljdr15T76ur1FDDLIQQ3qv71EdDOe3Kxj3leRXyk+pxdWnFWod6Wt2bY3de3aSuUHcPBVimHs7mK9WrmeOF6lR1o9qnzskh2ar2qm1qizpfXaPeVGdlmGN5pb09qMxz1Xb1kLqgzn1RyH7JUXW52lr5e/Kqi9qpto7V1atuUzfnARrV7jEib1T76gG2qxdGmXyiekkt1GswPTtek0aBfJp6YySGBfWg2tPQ0FAYgf1stUfdmdcjarbYJEniKIq6gY/Aw+zWHAC+p2labGpqiorFYgGYCEzN7oQdQClN07O1/EfDyGgC0ALMBdYAi4FyK+4H3gLPsxfR1zRNi+NP7nH5J+QntnXe5B5mpfQAAAAASUVORK5CYII=">
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="nimdoc.out.css?v=2.3.1">
<!-- JS -->
<script type="text/javascript" src="dochack.js?v=2.3.1"></script>
</head>
<body>
<div class="document" id="documentId">
<div class="container">
<h1 class="title">Packaging Nim</h1>
<p>This page provide hints on distributing Nim using OS packages.</p>
<p>See <a class="reference external" href="distros.html">distros</a> for tools to detect Linux distribution at runtime.</p>
<p>See <a class="reference external" href="intern.html#bootstrapping-the-compiler-reproducible-builds">here</a> for how to compile reproducible builds.</p>
<h1 id="supported-architectures">Supported architectures</h1><p>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.</p>
<ul class="simple"><li>amd64</li>
<li>arm64 (aka aarch64)</li>
<li>armel</li>
<li>armhf</li>
<li>i386</li>
<li>m68k</li>
<li>mips64el</li>
<li>mipsel</li>
<li>powerpc</li>
<li>ppc64</li>
<li>ppc64el (aka ppc64le)</li>
<li>riscv64</li>
</ul>
<p>The following platforms are seldomly tested:</p>
<ul class="simple"><li>alpha</li>
<li>hppa</li>
<li>ia64</li>
<li>mips</li>
<li>s390x</li>
<li>sparc64</li>
</ul>
<h1 id="packaging-for-linux">Packaging for Linux</h1><p>See <a class="reference external" href="https://github.com/nim-lang/Nim/labels/Installation">https://github.com/nim-lang/Nim/labels/Installation</a> for installation-related bugs.</p>
<p>Build Nim from the released tarball at <a class="reference external" href="https://nim-lang.org/install_unix.html">https://nim-lang.org/install_unix.html</a> It is different from the GitHub sources as it contains Nimble, C sources &amp; other tools.</p>
<p>The Debian package ships bash and ksh completion and manpages that can be reused.</p>
<p>Hints on the build process:</p>
<p><pre class="listing"><span class="Comment"># build from C sources and then using koch</span>
<span class="program">make</span> <span class="option">-j</span> <span class="Comment"># supports parallel build</span>
<span class="Comment"># alternatively: ./build.sh --os $os_type --cpu $cpu_arch</span>
<span class="program">./bin/nim</span> <span class="option">c</span> <span class="option">-d:release</span> <span class="option">koch</span>
<span class="program">./koch</span> <span class="option">boot</span> <span class="option">-d:release</span>
<span class="Comment"># optionally generate docs into doc/html</span>
<span class="program">./koch</span> <span class="option">docs</span>
<span class="program">./koch</span> <span class="option">tools</span>
<span class="Comment"># extract files to be really installed</span>
<span class="program">./install.sh</span> <span class="option">&lt;tempdir&gt;</span>
<span class="Comment"># also include the tools</span>
<span class="program">for</span> <span class="option">fn</span> <span class="option">in</span> <span class="option">nimble</span> <span class="option">nimsuggest</span> <span class="option">nimgrep</span><span class="Operator">;</span> <span class="program">do</span> <span class="option">cp</span> <span class="Identifier">./bin/$fn</span> <span class="Identifier">&lt;tempdir&gt;/nim/bin/</span><span class="Operator">;</span> <span class="program">done</span></pre></p>
<p>What to install:</p>
<ul class="simple"><li>The expected stdlib location is <tt class="docutils literal"><span class="pre">/usr/lib/nim/lib</span></tt>, previously it was just <tt class="docutils literal"><span class="pre">/usr/lib/nim</span></tt></li>
<li><tt class="docutils literal"><span class="pre">nimdoc.css</span></tt> and <tt class="docutils literal"><span class="pre">nimdoc.cls</span></tt> from the <tt class="docutils literal"><span class="pre">doc</span></tt> folder should go into <tt class="docutils literal"><span class="pre">/usr/lib/nim/doc/</span></tt></li>
<li><tt class="docutils literal"><span class="pre">tools/debug/nim-gdb.py</span></tt> should go into <tt class="docutils literal"><span class="pre">/usr/lib/nim/tools/</span></tt></li>
<li><tt class="docutils literal"><span class="pre">tools/dochack/dochack.js</span></tt> should be installed to <tt class="docutils literal"><span class="pre">/usr/lib/nim/tools/dochack/</span></tt></li>
<li>Global configuration files under <tt class="docutils literal"><span class="pre">/etc/nim</span></tt></li>
<li>Optionally: manpages, documentation, shell completion</li>
<li>When installing documentation, .idx files are not required</li>
<li>The &quot;compiler&quot; directory contains compiler sources and should not be part of the compiler binary package</li>
</ul>
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br>
<small style="color: var(--hint);">Made with Nim. Generated: 2025-12-25 20:12:52 UTC</small>
</div>
</div>
</div>
<script defer data-domain="nim-lang.org" src="https://plausible.io/js/plausible.js"></script>
</body>
</html>