This repository provides the nim-toolchain SDK for Workshop.
The SDK installs the Nim programming language toolchain for use inside Workshop environments.
It includes Nim and related command-line tools such as nimble, so projects can build, test, and run Nim code without manually setting up the toolchain inside each workshop.
name: nim-toolchain
publisher: Seiji Matsuoka (shizuku198411)
license: MIT
Published channels:
CHANNEL VERSION BASE REV
latest/stable 2.2.10 ubuntu@24.04 1
latest/edge 2.2.10 ubuntu@24.04 1
This SDK currently supports:
platforms:
ubuntu@24.04:amd64:
ubuntu@24.04:arm64:Add the SDK to your workshop.yaml:
name: nim-dev
base: ubuntu@24.04
sdks:
- name: nim-toolchain
channel: latest/stableLaunch the workshop:
workshop launchThen verify Nim inside the workshop:
workshop exec -- nim --version
workshop exec -- nimble --versionYou can also compile and run a simple Nim program:
workshop exec -- bash -lc 'echo "echo \"hello\"" > /tmp/hello.nim && nim c -r /tmp/hello.nim'The SDK installs:
- Nim
- Nimble
- Nimsuggest, when available in the Nim distribution
- Basic build dependencies needed for compiling Nim projects
The SDK downloads the upstream Nim binary archive based on the workshop architecture:
linux_x64foramd64linux_arm64forarm64
The installed commands are exposed through $HOME/.local/bin, which is already included in the default Workshop user PATH.
if you already install docker on host, before execute sdkcraft and workshop to allow lxdbr0 and workshopbr0 traffic.
sudo nft insert rule ip filter DOCKER-USER iifname workshopbr0 accept
sudo nft insert rule ip filter DOCKER-USER oifname workshopbr0 ct state related,established accept
sudo iptables -I DOCKER-USER -i lxdbr0 -j ACCEPT
sudo iptables -I DOCKER-USER -o lxdbr0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
sudo ip6tables -I DOCKER-USER -i lxdbr0 -j ACCEPT
sudo ip6tables -I DOCKER-USER -o lxdbr0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPTTo build and test the SDK locally, use sdkcraft.
Try the SDK locally:
sdkcraft clean
sdkcraft tryLaunch and verify:
workshop launch --verbose --wait-on-error
workshop run -- check-versions
workshop removePack the SDK:
sdkcraft clean
sdkcraft pack.
├── hooks
│ ├── setup-base
│ └── setup-project
├── sdkcraft.yaml
├── tests
│ ├── main
│ │ └── launch
│ │ └── task.yaml
│ └── spread.yaml
└── example
└── workshop.yaml
This SDK is licensed under the MIT License. Nim itself is also distributed under the MIT License.