setup-nim/action.yml
mr-boneman b1f3593a48
Some checks failed
/ test (push) Failing after 35s
fix
2024-05-12 21:48:40 +02:00

25 lines
No EOL
747 B
YAML

# SPDX-License-Identifier: MIT
name: 'setup nim'
description: 'set up nim using the official binaries'
inputs:
version:
description: 'nim version to install'
default: "2.0.4"
runs:
using: "composite"
steps:
- shell: bash
run: |
set -euxo pipefail
tempdir=$(mktemp -d)
pushd $tempdir
curl -o nim.tar.xz https://nim-lang.org/download/nim-${{ inputs.version }}-linux_x64.tar.xz
tar -xf nim.tar.xz
pushd nim-${{ inputs.version }}
./install.sh /usr/bin
popd
cp nim-${{ inputs.version }}/bin/* /usr/bin
mkdir ./lib && mv /usr/lib/nim/* ./lib && mv ./lib /usr/lib/nim/lib # fixes nim not finding the system lib
popdir
rm -fr $tempdir