I just upgraded my main channel and got nix-ld errors because of some interaction with curl being on the path.
However, removing it from programs.nix-ld.libraries by setting it to the empty list does not seem to anything. All standard libraries like are still linked. that is very unfortunate.
Can others replicate this behaviour? What could be wrong that the library change is not picked up? I also restartet the entire OS… nothing
Expected. Values in the module system are merged, if they have the same highest priority. And in this case the defaults for that option are set with regular priority:
This is to prevent people getting surprised that the defaults went missing if they set their own values.
If you want yours to have higher precedence, use lib.mkForce.
It is an external binary which is run here for my case, so nix-ld makes sense. There is only an interaction with curl, so that I bet I get the best out of both worlds by turning of curl in the standard nix-ld libraries. Sure it would be nice to create a custom wrapper around my executable, but it is easier to just take it off the entire system for now.
I don’t use nix-ld. If you have a specific set of code for me to test with, along with the full error, I could help further, otherwise that’s about all I could comment on that.
It is just that setting it empty won’t make /run/current-system/sw/share/nix-ld/lib empty, which is the location for nix-ld. E.g. curl will still be in there as well as everything else. (at least on my system).