Open dtzWill opened 6 years ago
As a sort of compromise, maybe we could produce wrappers for nix that set add the appropriate tools to PATH, and make the default nix in nixpkgs such a wrapped one? This would allow a reduced closure size while enabling all the functionality to work by default.
I submitted this a while back, which could be relevant: https://github.com/NixOS/nix/pull/1345
One thing that might be nice is a first-class building block for optional external dependencies in Nix code, that would let us enumerate them and detect early if they're available or not, to emit warnings/errors.
I marked this as stale due to inactivity. → More info
Various functionality provided by Nix tools and builtins relies on the presence and "correct" functionality of external tools.
This seems... unfortunate :innocent: .
The biggest issue is one of simple usability: evaluation failures due to missing tools are a bad experience and it's not always obvious, trivial, or convenient to manipulate the environment of the Nix-based process you're interacting with to properly resolve them.
As an example, nix-based services (such as the auto-upgrader) will fail to evaluate expressions using
builtins.fetchGit
and fixing it requires modifying the service configuration to add required tools to the service's PATH.Additional related issues:
I'm not sure of the best solution here, especially considering concerns about closure size and ease of deployment (being self-contained is rather useful here).
It's not perfect but best proposal I have is to replace all external programs with use of (mandatory?) libraries.
Thoughts? :)