Files
Nim/distros.html
github-actions[bot] ef3d9e7b38 Deploy to GitHub pages
2025-12-28 15:55:52 +00:00

328 lines
27 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>std/distros</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">std/distros</h1>
<div class="row">
<div class="three columns">
<div class="theme-select-wrapper">
<label for="theme-select">Theme:&nbsp;</label>
<select id="theme-select" onchange="setTheme(this.value)">
<option value="auto">🌗 Match OS</option>
<option value="dark">🌑 Dark</option>
<option value="light">🌕 Light</option>
</select>
</div>
<div id="global-links">
<ul class="simple-boot">
<li><a href="manual.html">Manual</a></li>
<li><a href="lib.html">Standard library</a></li>
<li> <a id="indexLink" href="theindex.html">Index</a></li>
<li><a href="compiler/theindex.html">Compiler docs</a></li>
<li><a href="https://nim-lang.github.io/fusion/theindex.html">Fusion docs</a></li>
<li><a href="https://nim-lang.github.io/Nim/">devel</a>, <a href="https://nim-lang.org/documentation.html">stable</a></li>
</ul>
</div>
<div id="searchInputDiv">
Search: <input type="search" id="searchInput"
oninput="search()" />
</div>
<ul class="simple simple-toc" id="toc-list">
<li>
<a class="reference reference-toplevel" href="#6" id="56">Imports</a>
</li>
<li>
<details open>
<summary><a class="reference reference-toplevel" href="#7" id="57">Types</a></summary>
<ul class="simple simple-toc-section">
<li><a class="reference" href="#Distribution" title="Distribution {.pure.} = enum
Windows, ## some version of Windows
Posix, ## some POSIX system
MacOSX, ## some version of OSX
Linux, ## some version of Linux
Ubuntu, Debian, Gentoo, Fedora, RedHat, OpenSUSE, Manjaro, Elementary, Zorin,
CentOS, Deepin, ArchLinux, Artix, Antergos, PCLinuxOS, Mageia, LXLE, Solus,
Lite, Slackware, Androidx86, Puppy, Peppermint, Tails, AntiX, Kali,
SparkyLinux, Apricity, BlackLab, Bodhi, TrueOS, ArchBang, KaOS, WattOS,
Korora, Simplicity, RemixOS, OpenMandriva, Netrunner, Alpine, BlackArch,
Ultimate, Gecko, Parrot, KNOPPIX, GhostBSD, Sabayon, Salix, Q4OS, ClearOS,
Container, ROSA, Zenwalk, Parabola, ChaletOS, BackBox, MXLinux, Vector, Maui,
Qubes, RancherOS, Oracle, TinyCore, Robolinux, Trisquel, Voyager, Clonezilla,
SteamOS, Absolute, NixOS, ## NixOS or a Nix build environment
AUSTRUMI, Arya, Porteus, AVLinux, Elive, Bluestar, SliTaz, Solaris, Chakra,
Wifislax, Scientific, ExTiX, Rockstor, GoboLinux, Void, BSD, FreeBSD, NetBSD,
OpenBSD, DragonFlyBSD, Haiku">Distribution</a></li>
</ul>
</details>
</li>
<li>
<details open>
<summary><a class="reference reference-toplevel" href="#8" id="58">Vars</a></summary>
<ul class="simple simple-toc-section">
<li><a class="reference" href="#foreignDeps" title="foreignDeps: seq[string] = @[]">foreignDeps</a></li>
</ul>
</details>
</li>
<li>
<details open>
<summary><a class="reference reference-toplevel" href="#10" id="60">Consts</a></summary>
<ul class="simple simple-toc-section">
<li><a class="reference" href="#LacksDevPackages" title="LacksDevPackages = {Distribution.Gentoo, Distribution.Slackware,
Distribution.ArchLinux, Distribution.Artix,
Distribution.Antergos, Distribution.BlackArch,
Distribution.ArchBang}">LacksDevPackages</a></li>
</ul>
</details>
</li>
<li>
<details open>
<summary><a class="reference reference-toplevel" href="#12" id="62">Procs</a></summary>
<ul class="simple simple-toc-section">
<ul class="simple nested-toc-section">echoForeignDeps
<li><a class="reference" href="#echoForeignDeps" title="echoForeignDeps()">echoForeignDeps()</a></li>
</ul>
<ul class="simple nested-toc-section">foreignCmd
<li><a class="reference" href="#foreignCmd%2Cstring" title="foreignCmd(cmd: string; requiresSudo = false)">foreignCmd(cmd: string; requiresSudo = false)</a></li>
</ul>
<ul class="simple nested-toc-section">foreignDep
<li><a class="reference" href="#foreignDep%2Cstring" title="foreignDep(foreignPackageName: string)">foreignDep(foreignPackageName: string)</a></li>
</ul>
<ul class="simple nested-toc-section">foreignDepInstallCmd
<li><a class="reference" href="#foreignDepInstallCmd%2Cstring" title="foreignDepInstallCmd(foreignPackageName: string): (string, bool)">foreignDepInstallCmd(foreignPackageName: string): (string, bool)</a></li>
</ul>
</ul>
</details>
</li>
<li>
<details open>
<summary><a class="reference reference-toplevel" href="#18" id="68">Templates</a></summary>
<ul class="simple simple-toc-section">
<ul class="simple nested-toc-section">detectOs
<li><a class="reference" href="#detectOs.t%2Cuntyped" title="detectOs(d: untyped): bool">detectOs(d: untyped): bool</a></li>
</ul>
</ul>
</details>
</li>
</ul>
</div>
<div class="nine columns" id="content">
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/distros.nim#L1" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/distros.nim#L1" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
<div id="tocRoot"></div>
<p class="module-desc">This module implements the basics for Linux distribution (&quot;distro&quot;) detection and the OS's native package manager. Its primary purpose is to produce output for Nimble packages, like:<pre>To complete the installation, run:
sudo apt-get install libblas-dev
sudo apt-get install libvoodoo</pre>
<p>The above output could be the result of a code snippet like:</p>
<p><pre class="listing"><span class="Keyword">if</span> <span class="Identifier">detectOs</span><span class="Punctuation">(</span><span class="Identifier">Ubuntu</span><span class="Punctuation">)</span><span class="Punctuation">:</span>
<span class="Identifier">foreignDep</span> <span class="StringLit">&quot;lbiblas-dev&quot;</span>
<span class="Identifier">foreignDep</span> <span class="StringLit">&quot;libvoodoo&quot;</span></pre></p>
<p>See <a class="reference external" href="packaging.html">packaging</a> for hints on distributing Nim using OS packages.</p>
</p>
<div class="section" id="6">
<h1><a class="toc-backref" href="#6">Imports</a></h1>
<dl class="item">
<a class="reference external" href="strutils.html">strutils</a>, <a class="reference external" href="osproc.html">osproc</a>, <a class="reference external" href="envvars.html">envvars</a>
</dl>
</div>
<div class="section" id="7">
<h1><a class="toc-backref" href="#7">Types</a></h1>
<dl class="item">
<div id="Distribution">
<dt><pre><a href="distros.html#Distribution"><span class="Identifier">Distribution</span></a> {.<span class="Identifier">pure</span>.} <span class="Other">=</span> <span class="Keyword">enum</span>
<span class="Identifier">Windows</span><span class="Other">,</span> <span class="Comment">## some version of Windows</span>
<span class="Identifier">Posix</span><span class="Other">,</span> <span class="Comment">## some POSIX system</span>
<span class="Identifier">MacOSX</span><span class="Other">,</span> <span class="Comment">## some version of OSX</span>
<span class="Identifier">Linux</span><span class="Other">,</span> <span class="Comment">## some version of Linux</span>
<span class="Identifier">Ubuntu</span><span class="Other">,</span> <span class="Identifier">Debian</span><span class="Other">,</span> <span class="Identifier">Gentoo</span><span class="Other">,</span> <span class="Identifier">Fedora</span><span class="Other">,</span> <span class="Identifier">RedHat</span><span class="Other">,</span> <span class="Identifier">OpenSUSE</span><span class="Other">,</span> <span class="Identifier">Manjaro</span><span class="Other">,</span> <span class="Identifier">Elementary</span><span class="Other">,</span> <span class="Identifier">Zorin</span><span class="Other">,</span>
<span class="Identifier">CentOS</span><span class="Other">,</span> <span class="Identifier">Deepin</span><span class="Other">,</span> <span class="Identifier">ArchLinux</span><span class="Other">,</span> <span class="Identifier">Artix</span><span class="Other">,</span> <span class="Identifier">Antergos</span><span class="Other">,</span> <span class="Identifier">PCLinuxOS</span><span class="Other">,</span> <span class="Identifier">Mageia</span><span class="Other">,</span> <span class="Identifier">LXLE</span><span class="Other">,</span> <span class="Identifier">Solus</span><span class="Other">,</span>
<span class="Identifier">Lite</span><span class="Other">,</span> <span class="Identifier">Slackware</span><span class="Other">,</span> <span class="Identifier">Androidx86</span><span class="Other">,</span> <span class="Identifier">Puppy</span><span class="Other">,</span> <span class="Identifier">Peppermint</span><span class="Other">,</span> <span class="Identifier">Tails</span><span class="Other">,</span> <span class="Identifier">AntiX</span><span class="Other">,</span> <span class="Identifier">Kali</span><span class="Other">,</span>
<span class="Identifier">SparkyLinux</span><span class="Other">,</span> <span class="Identifier">Apricity</span><span class="Other">,</span> <span class="Identifier">BlackLab</span><span class="Other">,</span> <span class="Identifier">Bodhi</span><span class="Other">,</span> <span class="Identifier">TrueOS</span><span class="Other">,</span> <span class="Identifier">ArchBang</span><span class="Other">,</span> <span class="Identifier">KaOS</span><span class="Other">,</span> <span class="Identifier">WattOS</span><span class="Other">,</span>
<span class="Identifier">Korora</span><span class="Other">,</span> <span class="Identifier">Simplicity</span><span class="Other">,</span> <span class="Identifier">RemixOS</span><span class="Other">,</span> <span class="Identifier">OpenMandriva</span><span class="Other">,</span> <span class="Identifier">Netrunner</span><span class="Other">,</span> <span class="Identifier">Alpine</span><span class="Other">,</span> <span class="Identifier">BlackArch</span><span class="Other">,</span>
<span class="Identifier">Ultimate</span><span class="Other">,</span> <span class="Identifier">Gecko</span><span class="Other">,</span> <span class="Identifier">Parrot</span><span class="Other">,</span> <span class="Identifier">KNOPPIX</span><span class="Other">,</span> <span class="Identifier">GhostBSD</span><span class="Other">,</span> <span class="Identifier">Sabayon</span><span class="Other">,</span> <span class="Identifier">Salix</span><span class="Other">,</span> <span class="Identifier">Q4OS</span><span class="Other">,</span> <span class="Identifier">ClearOS</span><span class="Other">,</span>
<span class="Identifier">Container</span><span class="Other">,</span> <span class="Identifier">ROSA</span><span class="Other">,</span> <span class="Identifier">Zenwalk</span><span class="Other">,</span> <span class="Identifier">Parabola</span><span class="Other">,</span> <span class="Identifier">ChaletOS</span><span class="Other">,</span> <span class="Identifier">BackBox</span><span class="Other">,</span> <span class="Identifier">MXLinux</span><span class="Other">,</span> <span class="Identifier">Vector</span><span class="Other">,</span> <span class="Identifier">Maui</span><span class="Other">,</span>
<span class="Identifier">Qubes</span><span class="Other">,</span> <span class="Identifier">RancherOS</span><span class="Other">,</span> <span class="Identifier">Oracle</span><span class="Other">,</span> <span class="Identifier">TinyCore</span><span class="Other">,</span> <span class="Identifier">Robolinux</span><span class="Other">,</span> <span class="Identifier">Trisquel</span><span class="Other">,</span> <span class="Identifier">Voyager</span><span class="Other">,</span> <span class="Identifier">Clonezilla</span><span class="Other">,</span>
<span class="Identifier">SteamOS</span><span class="Other">,</span> <span class="Identifier">Absolute</span><span class="Other">,</span> <span class="Identifier">NixOS</span><span class="Other">,</span> <span class="Comment">## NixOS or a Nix build environment</span>
<span class="Identifier">AUSTRUMI</span><span class="Other">,</span> <span class="Identifier">Arya</span><span class="Other">,</span> <span class="Identifier">Porteus</span><span class="Other">,</span> <span class="Identifier">AVLinux</span><span class="Other">,</span> <span class="Identifier">Elive</span><span class="Other">,</span> <span class="Identifier">Bluestar</span><span class="Other">,</span> <span class="Identifier">SliTaz</span><span class="Other">,</span> <span class="Identifier">Solaris</span><span class="Other">,</span> <span class="Identifier">Chakra</span><span class="Other">,</span>
<span class="Identifier">Wifislax</span><span class="Other">,</span> <span class="Identifier">Scientific</span><span class="Other">,</span> <span class="Identifier">ExTiX</span><span class="Other">,</span> <span class="Identifier">Rockstor</span><span class="Other">,</span> <span class="Identifier">GoboLinux</span><span class="Other">,</span> <span class="Identifier">Void</span><span class="Other">,</span> <span class="Identifier">BSD</span><span class="Other">,</span> <span class="Identifier">FreeBSD</span><span class="Other">,</span> <span class="Identifier">NetBSD</span><span class="Other">,</span>
<span class="Identifier">OpenBSD</span><span class="Other">,</span> <span class="Identifier">DragonFlyBSD</span><span class="Other">,</span> <span class="Identifier">Haiku</span></pre></dt>
<dd>
the list of known distributions
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/distros.nim#L36" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/distros.nim#L36" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</dl>
</div>
<div class="section" id="8">
<h1><a class="toc-backref" href="#8">Vars</a></h1>
<dl class="item">
<div id="foreignDeps">
<dt><pre><a href="distros.html#foreignDeps"><span class="Identifier">foreignDeps</span></a><span class="Other">:</span> <a href="system.html#seq"><span class="Identifier">seq</span></a><span class="Other">[</span><a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">]</span> <span class="Other">=</span> <span class="Operator">@</span><span class="Other">[</span><span class="Other">]</span></pre></dt>
<dd>
Registered foreign deps.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/distros.nim#L214" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/distros.nim#L214" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</dl>
</div>
<div class="section" id="10">
<h1><a class="toc-backref" href="#10">Consts</a></h1>
<dl class="item">
<div id="LacksDevPackages">
<dt><pre><a href="distros.html#LacksDevPackages"><span class="Identifier">LacksDevPackages</span></a> <span class="Other">=</span> <span class="Other">{</span><span class="DecNumber">Distribution.Gentoo</span><span class="Other">,</span> <span class="DecNumber">Distribution.Slackware</span><span class="Other">,</span>
<span class="DecNumber">Distribution.ArchLinux</span><span class="Other">,</span> <span class="DecNumber">Distribution.Artix</span><span class="Other">,</span>
<span class="DecNumber">Distribution.Antergos</span><span class="Other">,</span> <span class="DecNumber">Distribution.BlackArch</span><span class="Other">,</span>
<span class="DecNumber">Distribution.ArchBang</span><span class="Other">}</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/distros.nim#L138" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/distros.nim#L138" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</dl>
</div>
<div class="section" id="12">
<h1><a class="toc-backref" href="#12">Procs</a></h1>
<dl class="item">
<div id="echoForeignDeps-procs-all">
<div id="echoForeignDeps">
<dt><pre><span class="Keyword">proc</span> <a href="#echoForeignDeps"><span class="Identifier">echoForeignDeps</span></a><span class="Other">(</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Writes the list of registered foreign deps to stdout.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/distros.nim#L276" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/distros.nim#L276" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="foreignCmd-procs-all">
<div id="foreignCmd,string">
<dt><pre><span class="Keyword">proc</span> <a href="#foreignCmd%2Cstring"><span class="Identifier">foreignCmd</span></a><span class="Other">(</span><span class="Identifier">cmd</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">;</span> <span class="Identifier">requiresSudo</span> <span class="Other">=</span> <span class="Identifier">false</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Registers a foreign command to the internal list of commands that can be queried later.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/distros.nim#L216" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/distros.nim#L216" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="foreignDep-procs-all">
<div id="foreignDep,string">
<dt><pre><span class="Keyword">proc</span> <a href="#foreignDep%2Cstring"><span class="Identifier">foreignDep</span></a><span class="Other">(</span><span class="Identifier">foreignPackageName</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">OSError</span><span class="Other">,</span> <span class="Identifier">IOError</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ExecIOEffect</span><span class="Other">,</span> <span class="Identifier">ReadIOEffect</span><span class="Other">,</span> <span class="Identifier">RootEffect</span><span class="Other">,</span> <span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Registers <tt class="docutils literal"><span class="pre"><span class="Identifier">foreignPackageName</span></span></tt> to the internal list of foreign deps. It is your job to ensure that the package name is correct.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/distros.nim#L270" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/distros.nim#L270" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="foreignDepInstallCmd-procs-all">
<div id="foreignDepInstallCmd,string">
<dt><pre><span class="Keyword">proc</span> <a href="#foreignDepInstallCmd%2Cstring"><span class="Identifier">foreignDepInstallCmd</span></a><span class="Other">(</span><span class="Identifier">foreignPackageName</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Other">(</span><a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">,</span> <a href="system.html#bool"><span class="Identifier">bool</span></a><span class="Other">)</span> {.
<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">OSError</span><span class="Other">,</span> <span class="Identifier">IOError</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ExecIOEffect</span><span class="Other">,</span> <span class="Identifier">ReadIOEffect</span><span class="Other">,</span> <span class="Identifier">RootEffect</span><span class="Other">,</span> <span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Returns the distro's native command to install <tt class="docutils literal"><span class="pre"><span class="Identifier">foreignPackageName</span></span></tt> and whether it requires root/admin rights.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/distros.nim#L225" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/distros.nim#L225" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
</dl>
</div>
<div class="section" id="18">
<h1><a class="toc-backref" href="#18">Templates</a></h1>
<dl class="item">
<div id="detectOs-templates-all">
<div id="detectOs.t,untyped">
<dt><pre><span class="Keyword">template</span> <a href="#detectOs.t%2Cuntyped"><span class="Identifier">detectOs</span></a><span class="Other">(</span><span class="Identifier">d</span><span class="Other">:</span> <a href="system.html#untyped"><span class="Identifier">untyped</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#bool"><span class="Identifier">bool</span></a></pre></dt>
<dd>
Distro/OS detection. For convenience, the required <tt class="docutils literal"><span class="pre"><span class="Identifier">Distribution</span><span class="Operator">.</span></span></tt> qualifier is added to the enum value.
<a href="https://github.com/nim-lang/Nim/tree/devel/lib/pure/distros.nim#L207" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/lib/pure/distros.nim#L207" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
</dl>
</div>
</div>
</div>
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br>
<small style="color: var(--hint);">Made with Nim. Generated: 2025-12-28 15:54:40 UTC</small>
</div>
</div>
</div>
<script defer data-domain="nim-lang.org" src="https://plausible.io/js/plausible.js"></script>
</body>
</html>