You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to easily run applications on the system that are not patched (steam-run is not practical at all and integrates poorly with the host system) I set NIX_LD and NIX_LD_LIBRARY_PATH on my whole system. It worked great so far but I don't really like the idea that my system may be less reproducible as nix-ld is now always enabled. So I would love instead if nix-ld could read an environment variable like NIX_ENABLE_FHS that would enable it if it is set. Of course I could manually set NIX_LD_LIBRARY_PATH when I want a shell but it is not as practical to manually specify a huge list of items. Moreover I am also thinking to use this same environment variable to enable other systems like a /bin/bash or other programs (for modularity one could also define another environment variable when one wants to enable only nix_ld but not /bin/bash).
This also have the advantage that if the NIX_ENABLE_FHS is not set, then the user can get a meaningful error explaining that the loader /lib are disabled by default but could easily be enabled (in a quick and dirty way) by setting the above environment variable or by writting a proper derivation. We could also provide more meaningful default values that can run most programs. This way, nix-ld could even be set by default on nixos to provide more helpful help messages.
Do you think it would make sense to integrate this into nix-ld or should I create my own project to test these ideas?
The text was updated successfully, but these errors were encountered:
Sounds great as it avoids breaking existing stuff, and it seems quite flexible (we could fetch the data the first time the user uses the command, provide various "profiles" depending on the apps to install…). Just it may be a bit annoying to write one function for every shell (there are many more shells than zsh and bash), but we can certainly eithen start a new shell like nix-shell to populate the variables and drop the user in it's wanted shell after (just if a user wants to enable it in it's .bashrc/.profile it would not work ), or additionally provide values in NIX_LD_DEFAULT so that one can just write a few export NIX_LD=NIX_LD_DEFAULT if needed. Or explicitely ask the user to pipe the output to exec or alike, providing multiple options depending on the shell.
In order to easily run applications on the system that are not patched (steam-run is not practical at all and integrates poorly with the host system) I set
NIX_LD
andNIX_LD_LIBRARY_PATH
on my whole system. It worked great so far but I don't really like the idea that my system may be less reproducible asnix-ld
is now always enabled. So I would love instead ifnix-ld
could read an environment variable likeNIX_ENABLE_FHS
that would enable it if it is set. Of course I could manually setNIX_LD_LIBRARY_PATH
when I want a shell but it is not as practical to manually specify a huge list of items. Moreover I am also thinking to use this same environment variable to enable other systems like a/bin/bash
or other programs (for modularity one could also define another environment variable when one wants to enable onlynix_ld
but not/bin/bash
).This also have the advantage that if the
NIX_ENABLE_FHS
is not set, then the user can get a meaningful error explaining that the loader/lib
are disabled by default but could easily be enabled (in a quick and dirty way) by setting the above environment variable or by writting a proper derivation. We could also provide more meaningful default values that can run most programs. This way, nix-ld could even be set by default on nixos to provide more helpful help messages.Do you think it would make sense to integrate this into
nix-ld
or should I create my own project to test these ideas?The text was updated successfully, but these errors were encountered: