Nix / NixOS support
@ryoppippi is already working on this.
Since Aug 4, 2026.
Assessment
This issue has not been assessed yet.
Description
We're packaging vp (vite-plus 0.2.1) for nixpkgs (built from source). The core CLI works well, but several features fail or degrade under Nix, especially in "pure" Nix environments (NixOS, Nix build sandboxes, containers) that don't follow the FHS (no /lib64/ld-linux-*.so, no system libs in standard paths). Filing this so the Nix story can be tracked long-term. We are not asking to fix all of this now.
Environment
- vite-plus 0.2.1; Rust
vpbuilt from source, JS toolchain installed from npm. - macOS (aarch64-darwin) and Linux (x86_64 / aarch64) on a pure-Nix store.
1. Managed Node.js runtime doesn't execute on pure-Nix Linux (+ misleading success)
vp downloads a prebuilt Node.js from nodejs.org into ~/.vite-plus/js_runtime/node/<version>/bin/node. On pure-Nix Linux this generic glibc/musl binary can't run because its ELF interpreter (/lib64/ld-linux-x86-64.so.2 / ld-linux-aarch64.so.1) doesn't exist:
$ vp env use 26
Installing Node.js v26.3.1...
Using Node.js v26.3.1 (resolved from 26) # reports success, marks 26 "current"
$ vp env exec node --version
... cannot run: Dynamic loader not found: /lib64/ld-linux-x86-64.so.2 # exit 255
-
macOS is unaffected (the downloaded macOS node runs via dyld).
-
This affects everything that provisions/uses a managed node:
vp env use/install/exec/pin, and implicitlyvp create,vp run,vp install,vp dev/build/test, etc. -
Misleading UX:
vp env useexits 0 andvp env lsshows the version "current" even though the runtime can't execute; the failure only surfaces later as a raw loader error. A post-install "can this runtime actually exec?" check would help. -
Workaround that works under Nix:
vp env off(system-first) makesvpuse anodefromPATH(e.g. the Nix-provided nodejs), which runs, but it ignores per-project version requirements:$ vp env off && vp env exec node --version v24.15.0 # uses the system/Nix node; works -
Possible directions: an opt-in "use the runtime on PATH / bring-your-own-runtime" mode; or detecting a non-FHS environment and preferring a system runtime. (Nix-side mitigations like
nix-ldor an FHS env exist, but a vp-native option would be cleaner.) -
Update (nixpkgs default): the nixpkgs package now defaults to system-first (patches the default
ShimMode), sovpuses the Nix-provided node out of the box. Two follow-ups this surfaces: (a) in system-first mode,vp env use <v>/vp env install <v>still report success but are no-ops (the active runtime stays the system node), so the command should signal when switching has no effect; (b) under Nix,vp env usenever changes the shell'snoderegardless (there's no vp shim on PATH), so version management is effectively delegated to the Nix environment.
2. Managed package managers (pnpm, …)
Same download-and-run model. pnpm executes via the managed node, so it inherits the failure above on pure-Nix Linux; any natively-distributed package-manager binary would hit the FHS-loader issue directly.
3. fspy filesystem tracing (LD_PRELOAD) requires nightly Rust
fspy's preload cdylib uses the nightly-only c_variadic feature, so it can't be built with the stable rustc nixpkgs uses. We ship a stub, so fspy's filesystem tracing is non-functional in the Nix build, degrading anything that relies on it (e.g. task input/output tracking).
- Possible direction: build the preload cdylib on stable Rust (avoid
c_variadic/ nightly gates), or make fspy optional with graceful degradation.
4. fspy downloads macOS helper binaries during build.rs
On macOS, fspy's build.rs downloads oils-for-unix and coreutils from GitHub releases at build time and embeds them. Hermetic/sandboxed builds (nixpkgs, and generally any offline build) can't fetch during the build, so we stub them, degrading vp's hermetic shell-task execution on macOS.
- Possible direction: let these helpers be supplied via env/path (point at pre-fetched binaries) instead of downloading inside
build.rs.
5. JS toolchain native bindings are prebuilt-only (FYI)
@voidzero-dev/vite-plus-*, @oxlint/binding-*, @oxfmt/binding-*, etc. ship only as prebuilt napi binaries. Under Nix (Linux) they require autoPatchelf to fix the interpreter/rpath; statically-linked ones are skipped. This works but is fragile and offers no source-build path. Mostly an FYI for downstream packaging.
What works vs. not under Nix (vite-plus 0.2.1, nixpkgs build)
- Works:
vp --version/--help, the Rust CLI, JS-command loading; on macOS, the full managed-runtime flow (vp env use,vp create, …). - Fails on pure-Nix Linux: executing any downloaded managed runtime/tool (
vp env use+run,vp create,vp run, …). Workaround:vp env off. - Degraded in the Nix build: fspy tracing (stub) everywhere; fspy macOS shell helpers (stub) on macOS.
- Dominant language
- Rust
- Stars
- 5.8k
- Forks
- 263
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 148
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from voidzero-dev/vite-plus
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
voidzero-dev/vite-plus#2097 · 10 comments · 2 reactions ·
-
pending triage
Difficulty 5/5 Over a week Newbie friendliness 45/100
voidzero-dev/vite-plus#2781 · 2 reactions ·
-
enhancement
voidzero-dev/vite-plus#2766 · 4 comments · 1 reaction · 1 assignee ·
-
enhancement
voidzero-dev/vite-plus#2764 · 3 comments · 1 assignee ·
-
pending triage
Difficulty 3/5 1-2 days Newbie friendliness 68/100
voidzero-dev/vite-plus#2735 ·
All issues in voidzero-dev/vite-plus
Similar issues
-
Browser (wasm) relay client cannot connect to relays whose URL has a trailing-dot FQDN hostname Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
n0-computer/iroh#4550 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
paritytech/zombienet-sdk#591 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
farion1231/cc-switch#7638 · 1 comment ·
-
onnx-ir re-exports ModelProto and GraphProto but not NodeProto, AttributeProto and AttributeType Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100