Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/juspay-nix-bun
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: devops, productivity
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/nix-bun
What's inside
- Skill name
nix-bun- Description
- Use this when building a Bun (bun.lock) project with Nix. Covers bun2nix, the bun.nix dependency workflow, the bun --compile top-level-await pitfall, and a CI drift check.
- License
- MIT
- Instructions
- 71 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Bun + Nix with bun2nix
For Bun projects (those with a `bun.lock`), use [bun2nix](https://github.com/nix-community/bun2nix) — it converts the lockfile into a `bun.nix` expression so Nix installs dependencies deterministically and offline. Keep nixpkgs pinned via npins (see `nix-for-dev`) and add bun2nix as the single flake input.
## Dependency workflow
`bun.nix` is generated and must track `bun.lock`. Regenerate it whenever dependencies change:
```bash
nix run github:nix-community/bun2nix -- -o bun.nix
```
Pin the same bun2nix version in `flake.nix` (`?ref=2.1.0`) and in CI so generation is reproducible.
## Building
Idiomatic usage compiles a standalone binary:
```nix
# default.nix
{ bun2nix, ... }:
bun2nix.mkDerivation {
pname = "myapp";
version = "1.0.0";
src = ./.;
bunDeps = bun2nix.fetchBunDeps { bunNix = ./bun.nix; };
module = "src/index.ts"; # entrypoint compiled into `bin/myapp`
}
```
`bun2nix.packages.<system>.default` carries `mkDerivation`, `fetchBunDeps`, and `hook` as passthru attrs, so you can use it without a flake-parts overlay.
### Pitfall: `bun build --compile` is fragile
`mkDerivation { module = ...; }` runs `bun build --compile`, which **fails on top-level `await`** (`error: "await" can only be used inside an "async" function`) and can produce a broken binary for apps with **native addons or workers**. (`bun run` handles all of these — only the bundler chokes.)
When `--compile` doesn't work, build a wrapper that runs the entrypoint with `bun` instead, using bun2nix only for deterministic deps:
```nix
{ pkgs, bun2nix, ... }:
pkgs.stdenv.mkDerivation {
pname = "myapp"; version = "1.0.0"; src = ./.;
nativeBuildInputs = [ bun2nix.hook pkgs.makeWrapper ]; # hook populates node_modules offline
bunDeps = bun2nix.fetchBunDeps { bunNix = ./bun.nix; };
# buildPhase: build any workspace deps (tsc) the entrypoint imports
installPhase = ''
appdir=$out/share/myapp
mkdir -p $appdir $out/bin
cp -R src package.json node_modules $appdir/
makeWrapper ${pkgs.bun}/bin/bun $out/bin/myapp --add-flags "run $appdir/src/index.ts"
'';
dontFixup = true;
}
```
The bun2nix hook runs `patchShebangs`, but tsc's `/usr/bin/env node` shebang still breaks in the sandbox — invoke it as `bun ./node_modules/typescript/bin/tsc` instead of via the `.bin` symlink.
## CI: keep bun.nix from drifting
Add a check that fails when `bun.nix` is out of sync with `bun.lock`:
```yaml
- run: |
nix run github:nix-community/bun2nix/2.1.0 -- --lock-file ./bun.lock --output-file ./bun.nix
git diff --exit-code -- bun.nix \
|| { echo "::error::bun.nix is stale — run: nix run github:nix-community/bun2nix -- -o bun.nix"; exit 1; }
```
This check is fast; run it as a separate job from the (slow) `nix build` so PRs get quick feedback. For the build job, cache `/nix/store` — see `nix-ci`.From juspay/skills, MIT.
More from juspay/skills
- 0.632score
solidjs
juspay
Use this when writing, reviewing, or auditing SolidJS code for fine-grained reactivity, stable view identity, and owned resource lifetimes.
SkillAFreshness: A★ 11Claude Code +9 - 0.631score
nix-ci
juspay
Use this when setting up CI for a GitHub repository — offers GitHub Actions or Vira depending on the project
SkillAFreshness: A★ 11Claude Code +9 - 0.628score
nix-for-dev
juspay
Use this when setting up Nix for a development project (devShell + package build) and you care about `nix develop` being fast.
SkillAFreshness: A★ 11Claude Code +9 - 0.626score
waterfall
juspay
Implement anything end-to-end using two agents: planner cum reviewer (premium model) and an implementer (fast model)
SkillAFreshness: A★ 11Claude Code +9 - 0.592score
pg
juspay
Write essays, articles, and blog posts in Paul Graham's voice — plain, spoken prose that reasons out loud and lands surprising true claims, not AI filler.
SkillBFreshness: B★ 11Claude Code +9 - 0.586score
nix-justfile
juspay
Conventions for writing justfile recipes in Nix-based projects.
SkillBFreshness: B★ 11Claude Code +9 - 0.586score
nix-rust-leptos
juspay
Conventions for building Leptos CSR apps with Nix (crane + Trunk).
SkillBFreshness: B★ 11Claude Code +9 - 0.586score
nix-typescript
juspay
pnpm + Nix build conventions.
SkillBFreshness: B★ 11Claude Code +9 - 0.581score
cargo-watch
juspay
Run cargo-watch in the background for continuous clippy feedback during code editing.
SkillBFreshness: B★ 11Claude Code +9 - 0.542score
nix-perf
juspay
Use this when a flake's `nix develop` / `direnv allow` / `nix flake archive` is slow on a fresh checkout (the "first time takes 10 minutes" complaint).
SkillCFreshness: C★ 11Claude Code +9 - 0.542score
nix-oss-cache
juspay
Use this when setting up a GitHub repo to push its Nix builds to Juspay's shared OSS Attic cache (cache.nixos.asia/oss) — adds the substituter to flake.nix, a…
SkillCFreshness: C★ 11Claude Code +9 - 0.477score
nix-health
juspay
Use this when diagnosing or fixing a user's Nix installation — checks flakes, version, caches, max-jobs, direnv, rosetta, trusted-users, and shell config
SkillDFreshness: D★ 11Claude Code +9
Signals
- Stars
- 11
- Forks
- 0
- Open issues
- 3
- Last commit (this folder)
- Jun 15, 2026 (4 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/juspay/skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from juspay
- 0.632score
solidjs
juspay
Use this when writing, reviewing, or auditing SolidJS code for fine-grained reactivity, stable view identity, and owned resource lifetimes.
SkillAFreshness: A★ 11Claude Code +9 - 0.631score
nix-ci
juspay
Use this when setting up CI for a GitHub repository — offers GitHub Actions or Vira depending on the project
SkillAFreshness: A★ 11Claude Code +9 - 0.628score
nix-for-dev
juspay
Use this when setting up Nix for a development project (devShell + package build) and you care about `nix develop` being fast.
SkillAFreshness: A★ 11Claude Code +9 - 0.626score
waterfall
juspay
Implement anything end-to-end using two agents: planner cum reviewer (premium model) and an implementer (fast model)
SkillAFreshness: A★ 11Claude Code +9 - 0.601score
nix-chrome-devtools-mcp
juspay
chrome-devtools-mcp launcher — a single bash script that resolves Playwright's bundled Chrome-for-Testing and Node.js directly through Nix.
SkillAFreshness: A★ 4Claude Code +9 - 0.592score
pg
juspay
Write essays, articles, and blog posts in Paul Graham's voice — plain, spoken prose that reasons out loud and lands surprising true claims, not AI filler.
SkillBFreshness: B★ 11Claude Code +9
Cite this page
nix-bun skill. Agent Mart. https://agentmart.dev/skills/juspay-nix-bun (last updated 2026-10-24)