Closed savil closed 1 week ago
This pull request was deployed and Sentry observed the following issues:
go.jetpack.io/devbox/internal/shellgen in makeF...
View Issuego.jetpack.io/devbox/internal/searcher in execG...
View Issuego.jetpack.io/devbox/internal/searcher in execG...
View IssueDid you find this useful? React with a 👍 or 👎
…vars
Summary
In this PR, we change
devbox global
shell environment to omit the env-vars fromnix print-dev-env
. Instead, we rely on thenix profile
that Devbox manages to introduce the global packages intoPATH
. As before,nix profile
continues to be generated from thebuildInputs
fromnix print-dev-env <devbox-generated-flake>
.The motivation is:
devbox global
adds a bunch of nix stdenv packages to the top of your$PATH
variable, which can cause conflicts when trying to compile or build projects on your machine.devbox global
also sets a globalPYTHONPATH
variable that interferes with other packages, as well as python scripts that are installed/running on the host. This globalPYTHONPATH
is unnecessary because any python binaries installed by the user are already wrapped with thePYTHONPATH
Implementation notes:
Devbox.envForPackageBins
boolean setting that controls whether the Devbox Environment is optimized for executing package binaries, or for developing software using the packages.flagDefaultOptions
toshellEnvCmd
. This is a nicer way of overriding the defaults in global, even for the--recompute
flag that we had done before.devbox.execPrintDevEnv
function to remove some of the complexity from thedevbox.computeEnv
function (thanks to finger-wagging by our linter tool ;) ).TODO:
omitNixEnv
is still properly handling the useNixPrintDevEnvCache call pathsHow was it tested?
CICD tests should pass
TODO:
devbox global