Vscode julia language server cannot load on recent nixos

after upgrading my nixos, the juliaup julia process cannot start the vscode language server because of some curl dependency.
Is this not managed inside julia?

Usually on nixos things only break if the program depends implicitly on outside state…

Any help is highly appreciated. Running julia 1.11.3

ERROR: LoadError: InitError: could not load library "libcurl.so.4"
/run/current-system/sw/share/nix-ld/lib/libcurl.so.4: undefined symbol: libssh2_session_callback_set2

EDIT: Here the full error stacktrace

[ Info: Starting LS with Julia 1.11.3
ERROR: LoadError: InitError: could not load library "libcurl.so.4"
/run/current-system/sw/share/nix-ld/lib/libcurl.so.4: undefined symbol: libssh2_session_callback_set2
Stacktrace:
  [1] dlopen(s::String, flags::UInt32; throw_error::Bool)
    @ Base.Libc.Libdl ./libdl.jl:120
  [2] dlopen (repeats 2 times)
    @ ./libdl.jl:119 [inlined]
  [3] __init__()
    @ LibCURL_jll ~/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/share/julia/stdlib/v1.11/LibCURL_jll/src/LibCURL_jll.jl:29
  [4] run_module_init(mod::Module, i::Int64)
    @ Base ./loading.jl:1378
  [5] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1366
  [6] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any}, ignore_native::Nothing; register::Bool)
    @ Base ./loading.jl:1254
  [7] _include_from_serialized (repeats 2 times)
    @ ./loading.jl:1210 [inlined]
  [8] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128, stalecheck::Bool; reasons::Dict{String, Int64}, DEPOT_PATH::Vector{String})
    @ Base ./loading.jl:2041
  [9] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:2527
 [10] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2388
 [11] #invoke_in_world#3
    @ ./essentials.jl:1089 [inlined]
 [12] invoke_in_world
    @ ./essentials.jl:1086 [inlined]
 [13] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2375
 [14] macro expansion
    @ ./loading.jl:2314 [inlined]
 [15] macro expansion
    @ ./lock.jl:273 [inlined]
 [16] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2271
 [17] #invoke_in_world#3
    @ ./essentials.jl:1089 [inlined]
 [18] invoke_in_world
    @ ./essentials.jl:1086 [inlined]
 [19] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2260
during initialization of module LibCURL_jll
in expression starting at /home/ssahm/.vscode-oss/extensions/julialang.language-julia-1.127.2-universal/scripts/languageserver/main.jl:7
[Error - 9:54:19 AM] Server process exited with code 1.
[Error - 9:54:19 AM] Server initialization failed.

EDIT: insight
If I understand the error correctly, nixos sets some LD_LIBRARY_PATH for the julia process which somehow is taken into account by LibCURL_jll on an rebuild of Pkg. I would expect LibCURL_jll to definitely use its wrapped curl instead of looking outside, but this seems not true.

I can confirm that by overloading NIX_LD_LIBRARY_PATH with a path which does not include curl everything works.

It would be great if building LibCURL_jll is resistant against LD_LIBRARY_PATH settings