Skip to content

Commit 316219f

Browse files
authored
internal/devbox: stop setting LD_LIBRARY_PATH and LIBRARY_PATH (#1799)
As discussed, these cause way more problems than they solve. Now that we support multiple and non-default package outputs, other programs should be able to find libraries as long as they use the wrapped clang/gcc from the stdenv. Fixes #1752. Fixes #1798.
1 parent 8fc385e commit 316219f

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

internal/devbox/devbox.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -961,8 +961,6 @@ func (d *Devbox) computeEnv(ctx context.Context, usePrintDevEnvCache bool) (map[
961961

962962
debug.Log("computed environment PATH is: %s", env["PATH"])
963963

964-
d.setCommonHelperEnvVars(env)
965-
966964
if !d.pure {
967965
// preserve the original XDG_DATA_DIRS by prepending to it
968966
env["XDG_DATA_DIRS"] = envpath.JoinPathLists(env["XDG_DATA_DIRS"], os.Getenv("XDG_DATA_DIRS"))
@@ -1201,14 +1199,6 @@ var ignoreDevEnvVar = map[string]bool{
12011199
"UID": true,
12021200
}
12031201

1204-
// setCommonHelperEnvVars sets environment variables that are required by some
1205-
// common setups (e.g. gradio, rust)
1206-
func (d *Devbox) setCommonHelperEnvVars(env map[string]string) {
1207-
profileLibDir := filepath.Join(d.projectDir, nix.ProfilePath, "lib")
1208-
env["LD_LIBRARY_PATH"] = envpath.JoinPathLists(profileLibDir, env["LD_LIBRARY_PATH"])
1209-
env["LIBRARY_PATH"] = envpath.JoinPathLists(profileLibDir, env["LIBRARY_PATH"])
1210-
}
1211-
12121202
func (d *Devbox) ProjectDirHash() string {
12131203
h, _ := cachehash.Bytes([]byte(d.projectDir))
12141204
return h

0 commit comments

Comments
 (0)