This module implements the basics for Linux distribution ("distro") detection and the OS's native package manager. Its primary purpose is to produce output for Nimble packages like:
To complete the installation, run: sudo apt-get libblas-dev sudo apt-get libvoodoo
The above output could be the result of a code snippet like:
if detectOs(Ubuntu): foreignDep "lbiblas-dev" foreignDep "libvoodoo"
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, 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, AUSTRUMI, Arya, Porteus, AVLinux, Elive,
Bluestar, SliTaz, Solaris, Chakra, Wifislax, Scientific, ExTiX, Rockstor, GoboLinux,
BSD, FreeBSD, OpenBSD, DragonFlyBSD, HaikuLacksDevPackages = {Distribution.Gentoo, Distribution.Slackware,
Distribution.ArchLinux}proc foreignCmd(cmd: string; requiresSudo = false) {...}{.raises: [], tags: [].}proc foreignDepInstallCmd(foreignPackageName: string): (string, bool) {...}{.raises: [],
tags: [].}proc foreignDep(foreignPackageName: string) {...}{.raises: [], tags: [].}proc echoForeignDeps() {...}{.raises: [], tags: [].}template detectOs(d: untyped): bool
Distribution. qualifier is added to the enum value.
© 2006–2018 Andreas Rumpf
Licensed under the MIT License.
https://nim-lang.org/docs/distros.html