Skip to content
This repository has been archived by the owner on Apr 14, 2022. It is now read-only.
/ nim_lang_snap Public archive

Snap of the Nim programming language automated with GitHub Actions

License

Notifications You must be signed in to change notification settings

sirredbeard/nim_lang_snap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snap of the Nim programming language

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.

A snap is a bundle of an app and its dependencies that works without modification across many different Linux distributions.

For a technical walkthrough of how this repository works, see my blog post.

Branches

Stable

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.

Get it from the Snap Store Or visit the Snapcraft Store.

See Installing Snapd if you do not have snap installed.

stable status nim-lang

LTS 1.0.x

Recommended for Nim applications targeted to the LTS 1.0.x LTS branch.

$ snap install nim-lang-lts-1 --classic

Snapcraft Store

lts status nim-lang-lts-1

Nightly

Recommended for testing nightly builds of Nim. Likely contains bugs.

$ snap install nim-lang-nightly --classic --edge

Snapcraft Store

nightly status nim-lang-nightly

Running Nim from Snap packages

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.*.

Aliases

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 ;\'

Repository Files

GitHub Actions workflows

/github/workflows

  • stable.yml - Pushes Nim stable snap to snap store.

  • 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.

Snap template files

/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/

Issues

About

Snap of the Nim programming language automated with GitHub Actions

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published