Nix / NixOS support
Maintainer thường phản hồi trong vòng 1 ngày
@myuron đang làm issue này rồi.
Từ ngày 5/10/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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.
- Ngôn ngữ chính
- Rust
- Star
- 6k
- Fork
- 274
- Merge trung bình
- 1 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 196
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của voidzero-dev/vite-plus
-
`npx --package=vite-plus vp create` fails with exit 127 when npm is the chosen package managerCó thể đã có người làm @Crimson341 đã nhận 1 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
voidzero-dev/vite-plus#2970 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
pending triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
voidzero-dev/vite-plus#2882 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
voidzero-dev/vite-plus#2097 · 10 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
vp treats a nested project as part of the parent's pnpm workspace, ignoring its own packageManager and lockfileCó thể đã có người làm @liangmiQwQ đã nhận hôm nay. Đang mởbug enhancement
voidzero-dev/vite-plus#3013 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Windows: PowerShell installer (1.1.0) does not add vite-plus\bin to user PATH — 'vp' not recognizedCó thể đã có người làm @fengmk2 đã nhận hôm nay. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
voidzero-dev/vite-plus#2984 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của voidzero-dev/vite-plus
Issue tương tự
-
ai_p2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
ClickHouse/ClickHouse#125522 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: OpenRouter streaming chunks report the requested router name instead of the model OpenRouter servedCó thể đã có người làm @Mrun25 đã nhận hôm nay. Đang mởbug llm translation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
BerriAI/litellm#46095 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug effort:low flow:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
jaroslawherod/micold-ai-ide#788 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Docs: refresh target-app-parity and file-format-parity against mainCó thể đã có người làm @vangel76 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
storytold/photocraft#4417 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
bevyengine/dlss_wgpu#37 ·