Skip to content

Add nix support

Add nix support #4

Workflow file for this run

name: Nix Build
on:
pull_request:
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install nix
uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Configure nix
run: echo 'accept-flake-config = true' >>~/.config/nix/nix.conf
- name: Check nix build
run: nix build
- name: Check nix develop
run: |
SYSTEM=$(nix eval --impure --expr builtins.currentSystem)
SHELLS=$(nix eval --raw ".#devShells.$SYSTEM" \
--apply 's: builtins.toString (builtins.attrNames s)')
for NAME in $SHELLS
do
echo ">>>> $NAME <<<<"
nix develop ".#$NAME" -c true
done