Nix / NixOS support
Los mantenedores suelen responder en 1 día
@myuron ya está trabajando en esto.
Desde el 5/10/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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.
- Lenguaje dominante
- Rust
- Estrellas
- 6k
- Forks
- 274
- Merge medio
- 1 d 11 h
- PR fusionados (30 d)
- 206
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de voidzero-dev/vite-plus
-
`npx --package=vite-plus vp create` fails with exit 127 when npm is the chosen package managerAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
voidzero-dev/vite-plus#2970 ·
Los mantenedores suelen responder en 1 día
-
pending triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
voidzero-dev/vite-plus#2882 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
voidzero-dev/vite-plus#2097 · 10 comentarios · 2 reacciones ·
Los mantenedores suelen responder en 1 día
-
Windows: PowerShell installer (1.1.0) does not add vite-plus\bin to user PATH — 'vp' not recognizedAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
voidzero-dev/vite-plus#2984 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
pending triage
Dificultad 3/5 1-2 días Aptitud para principiantes 40/100
voidzero-dev/vite-plus#2983 ·
Los mantenedores suelen responder en 1 día
Todos los issues de voidzero-dev/vite-plus
Issues similares
-
C-bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
rust-lang/rust-analyzer#23501 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
[Bug]: Web chat input doesn't regain focus after a reply finishesPosiblemente ocupada @GaijinSystems la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
zeroclaw-labs/zeroclaw#11658 ·
Los mantenedores suelen responder en 2 días
-
good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
bytecodealliance/wasm-tools#2768 ·
Los mantenedores suelen responder en 1 día