Devbox does not pull *-dev outputs into build environment (headers missing)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- go
Línea de trabajo
The report identifies package handling in Devbox environments but names no source files or tests. Start by tracing how packages such as libyaml are turned into shell build inputs, then compare that behavior with the described nix-shell semantics. Done means the reproduction with devbox add libyaml gcc makes yaml.h available without manually adding libyaml.dev; add or run relevant tests if you locate them.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What happened?
When using nix-shell / nix develop, adding a library package implicitly makes its headers available via the dev output (through normal buildInputs semantics).
Devbox does not do this. As a result, headers are missing unless the user manually adds <package>.dev.
This breaks common C/C++ expectations and makes Devbox environments subtly incomplete compared to standard Nix shells.
Expected result
yaml.h should be available automatically, as it is in nix-shell / nix develop when adding libyaml.
Actual result
Compilation fails because headers are missing:
main.c:1:10: fatal error: yaml.h: No such file or directory
Workaround
Manually add the dev output:
devbox add libyaml.dev
After this, compilation succeeds.
Why this is a problem
- In
nixpkgs, headers live in thedevoutput by design. nix-shellusers reasonably expect headers to be present when a library is added.- Devbox requires users to know about and manually add output-specific derivations, which defeats the abstraction Devbox aims to provide.
- This is especially painful for newcomers unfamiliar with
outputs = [ "out" "dev" ].
Suggested fix
Devbox should automatically include the dev output for library packages (or at least for packages commonly used as build dependencies), matching nix-shell / mkShell behavior.
At minimum, this behavior should be documented very clearly.
Steps to reproduce
-
Initialize devbox:
devbox init -
Add packages:
devbox add libyaml gcc -
Create a test file:
echo '#include <yaml.h> void main(){}' > main.c -
Enter shell:
devbox shell -
Compile:
gcc main.c
Command
devbox add libyaml
devbox.json
Without workaround
{
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.16.0/.schema/devbox.schema.json",
"packages": [
"libyaml@latest"
],
"shell": {
"init_hook": [
"echo 'Welcome to devbox!' > /dev/null"
],
"scripts": {
"test": [
"echo \"Error: no test specified\" && exit 1"
]
}
}
}
With workaround (devbox add libyaml.dev)
{
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.16.0/.schema/devbox.schema.json",
"packages": [
"libyaml@latest",
"libyaml.dev"
],
"shell": {
"init_hook": [
"echo 'Welcome to devbox!' > /dev/null"
],
"scripts": {
"test": [
"echo \"Error: no test specified\" && exit 1"
]
}
}
}
Devbox version
0.16.0
Nix version
nix (Nix) 2.31.2+2
What system does this bug occur on?
Linux (x86_64)
Debug logs
No response
- Lenguaje dominante
- Go
- Estrellas
- 12.4k
- Forks
- 358
- Merge medio
- 17 h 12 min
- PR fusionados (30 d)
- 31
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una 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 jetify-com/devbox
-
feature triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
jetify-com/devbox#3038 ·
Los mantenedores suelen responder en 1 día
-
pulumi is outdatedAbiertobug p4 package processed triage unrelated
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
jetify-com/devbox#2898 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
p4 processed unrelated
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
jetify-com/devbox#2750 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
StorydenAbiertop4 package processed triage unrelated
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
jetify-com/devbox#2685 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[Plugin Request]: apacheKafkaAbiertolooks easy p4 package processed triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 60/100
jetify-com/devbox#2656 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de jetify-com/devbox
Issues similares
-
area/docs framework/hugo help wanted language/markdown
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:other issue-rating: 🦞 diamond lobster no-stale P2
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
openclaw/crabbox#3060 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
kubeflow/semantic-operator#52 ·
Los mantenedores suelen responder en 10 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
enhancement help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
PramodBasavarajMenasi/siftwise#52 ·
Los mantenedores suelen responder en 1 día