Skip to content

Use pinned Nix tools for development and dashboard builds - #814

Merged
f-f merged 2 commits into
masterfrom
trh/nix-dashboard-toolchain
Oct 18, 2026
Merged

f-f merged 2 commits into
masterfrom
trh/nix-dashboard-toolchain

Conversation

@thomashoneyman

@thomashoneyman thomashoneyman commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

One more small update to the developer flake!

I noticed a few gaps in how we selected tools for local development and dashboard CI, so this makes both use the pinned Nix toolchain, with JavaScript dependencies installed from package-lock.json.

The dev shell now includes esbuild and the npm dependency hash utility. The dashboard is also a Nix build target, reusing the existing compiled PureScript and locked npm dependencies. CI deploys its output directly, and the regular Nix checks build it too. The dashboard workflow now also runs when its own file changes.

The development shell still uses normal zsh but: for local development, direnv with nix-direnv activates the environment in your existing shell. I had noticed on macOS that my shell configuration was putting macOS's tar ahead of Nix's GNU tar, causing spago test to fail even after entering a Nix shell. With the shell integration configured, entering the repository selects the Nix tools and the tests pass.

To test manually on macOS, configure direnv with nix-direnv and enable its zsh hook. Then, from a fresh terminal:

cd /path/to/registry-dev
direnv allow

# These should resolve into /nix/store.
command -v tar node spago

# This should report GNU tar.
tar --version

# this should all pass
npm ci --omit=optional --no-audit --no-fund
spago build
spago test

Leave and re-enter the directory, then repeat the tool checks to confirm automatic activation. Also check that explicit shell entry works:

nix develop
tar --version
spago test
exit

To build the complete dashboard site:

nix build .#dashboard

The result/ directory contains index.html, app.js, and static/. (The local watch command remains npm run dashboard:dev)

@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://purescript.github.io/registry-dev/pr-preview/pr-814/

Built to branch gh-pages at 2026-10-18 22:29 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@thomashoneyman
thomashoneyman marked this pull request as ready for review October 18, 2026 22:26
@f-f
f-f merged commit 663d08d into master Oct 18, 2026
9 checks passed
@f-f
f-f deleted the trh/nix-dashboard-toolchain branch October 18, 2026 22:57
@f-f

f-f commented Oct 18, 2026

Copy link
Copy Markdown
Member

@thomashoneyman

Copy link
Copy Markdown
Member Author

Ugh, I never get actions right the first time. It looks like the deploy was fine but I missed a guard to avoid trying to clean up the preview build on master. Should be a one-liner one sec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants