I maintain snap packages of Nim.

  * [nim-lang](https://snapcraft.io/nim-lang) is built from stable releases
  * [nim-lang-lts-1](https://snapcraft.io/nim-lang-lts-1) is built from 
releases on the 1.0 LTS branch
  * [nim-lang-nightly](https://snapcraft.io/nim-lang-nightly) are built nightly 
from the master branch
  * [nim-lang-docs](https://snapcraft.io/nim-lang-docs) contains a build of the 
most recent documentation for Nim



I have released snap builds for arm64, armhf, and i386, in addition to the 
existing amd64 builds, and I invite your testing and [bug 
reports](https://github.com/sirredbeard/nim_lang_snap/issues).

Background:

The [build code is hosted on 
GitHub](https://github.com/sirredbeard/nim_lang_snap). A [GitHub 
action](https://github.com/sirredbeard/nim_lang_snap/blob/master/.github/workflows/nightly.yml)
 triggers a build on push and daily on a cron timer, it sets up a build 
environment [using a Docker 
container](https://github.com/sirredbeard/snap-build/blob/master/Dockerfile) 
optimized for using snapcraft, it then [configures the snapcraft.yaml based on 
metadata](https://github.com/sirredbeard/nim_lang_snap/blob/master/.github/workflows/stable.yml#L22)
 from GitHub, and [pushes the snapcraft.yaml to 
Launchpad](https://github.com/sirredbeard/nim_lang_snap/blob/master/.github/workflows/stable.yml#L35)
 to be built for amd64, armhf, i386, and arm64 using [snapcraft 
remote-build](https://snapcraft.io/docs/remote-build). The compiled snaps are 
then collected and then [pushed to the Snap 
store](https://github.com/sirredbeard/nim_lang_snap/blob/master/.github/workflows/stable.yml#L45).
 Securing is maintained by storing authentication files as base64-encoded 
[encrypted environmental 
variables](https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets)
 in the GitHub Action, then [decoding them to 
file](https://github.com/sirredbeard/nim_lang_snap/blob/master/.github/workflows/nightly.yml#L31)
 as needed.

Snaps now have [separate release channels 
built-in](https://snapcraft.io/docs/channels) but I still have separate 
packages for stable, nightly, and LTS so you can have multiple branches of Nim 
installed and test against each. My current plan is that when snaps get the 
ability to have multiple channels installed side-by-side these three packages 
will switch to a single package.

Hayden [@unixterminal](https://twitter.com/unixterminal)

Reply via email to