jetify-com / devbox

Instant, easy, and predictable development environments
https://www.jetify.com/devbox/
Apache License 2.0
7.83k stars 187 forks source link

[devbox global] add `--omit-nix-env` flag for shellenv/shell/run commands #2150

Closed savil closed 1 week ago

savil commented 2 weeks ago

…vars

Summary

In this PR, we change devbox global shell environment to omit the env-vars from nix print-dev-env. Instead, we rely on the nix profile that Devbox manages to introduce the global packages into PATH. As before, nix profile continues to be generated from the buildInputs from nix print-dev-env <devbox-generated-flake>.

The motivation is:

  1. 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.
  2. devbox global also sets a global PYTHONPATH variable that interferes with other packages, as well as python scripts that are installed/running on the host. This global PYTHONPATH is unnecessary because any python binaries installed by the user are already wrapped with the PYTHONPATH

Implementation notes:

TODO:

How was it tested?

CICD tests should pass

TODO:

sentry-io[bot] commented 1 week ago

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

Did you find this useful? React with a 👍 or 👎