This repository is a set of GitHub Actions and Snapcraft snap templates that automates deployment of stable, LTS, and nightly builds of the Nim programming language and bundled tools.
Nim is a compiled, garbage-collected systems programming language with a design that focuses on efficiency, expressiveness, and elegance.
- Learn Nim - Tutorial
- Documentation - Documentation
- Nim in Action - Book from Manning Publications
- What Is Nim? A brief introduction to the Nim programming language - YouTube video
A snap is a bundle of an app and its dependencies that works without modification across many different Linux distributions.
- Getting Started - Tutorial
- Documentation - Documentation
- Snapcraft Store - Snap app store
For a technical walkthrough of how this repository works, see my blog post.
Recommended for most users.
Install from the command line with: $ snap install nim-lang --classic
Run with $ nim-lang.nim c helloworld.nim
, see Running Nim from Snap packages below.
Or visit the Snapcraft Store.
See Installing Snapd if you do not have snap installed.
Recommended for Nim applications targeted to the LTS 1.0.x LTS branch.
$ snap install nim-lang-lts-1 --classic
Recommended for testing nightly builds of Nim. Likely contains bugs.
$ snap install nim-lang-nightly --classic --edge
Once installed, stable binaries can be called as:
nim-lang.nim
nim-lang.nimcsources
nim-lang.nimgdb
nim-lang.nimpretty
nim-lang.testament
nim-lang.nimble
nim-lang.nimfind
nim-lang.nimgrep
nim-lang.nimsuggest
Nightly will be nim-lang-nightly.*
and LTS will be nim-lang-lts-1.*
.
You can use snap to create shorter aliases:
sudo snap alias nim-lang.nim nim
Or you can set aliases for all nim programs using:
sudo bash -c 'snap alias nim-lang.nim nim ;\
snap alias nim-lang.nimcsources nim_csources ;\
snap alias nim-lang.nim-gdb nim-gdb ;\
snap alias nim-lang.nimpretty nimpretty ;\
snap alias nim-lang.testament testament ;\
snap alias nim-lang.nimble nimble ;\
snap alias nim-lang.nimfind nimfind ;\
snap alias nim-lang.nimgrep nimgrep ;\
snap alias nim-lang.nimsuggest nimsuggest ;\'
/github/workflows
-
stable.yml - Pushes Nim stable snap to snap store.
- Gets latest release using lastversion.
-
lts-1.yml - Pushes Nim LTS 1 snap to snap store.
- Gets latest 1.0.x build using curl, jq, grep, awk, and tr directly from the GitHub API.
-
nightly.yml - Pushes Nim nightly snap to snap store.
/stable/snap/
- snapcraft.yaml - Nim stable snap file template (updated by data from lastversion in stable.yml).
/lts-1/snap/
- snapcraft.yaml - Nim lts 1 branch snap file (updated by data from GitHub API in lts-1.yml).
/nightly/snap/
- snapcraft.yaml - Nim nightly snap file,