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
Various functionality provided by Nix tools and builtins relies on the presence and "correct" functionality of external tools.
This seems... unfortunate 😇 .
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:
The full list of tools required to make use of builtin Nix functionality is not available AFAICT (although this is easily fixed)
Reliance on these tools makes Nix evaluation "brittle" in a very (IMHO) non-Nix way--consider attempting to use Nix itself in a sandbox.
Reliability and purity: tools found may have different behavior than those expected and tested against (newer, older, bugged, malicious replacements).
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? :)
The text was updated successfully, but these errors were encountered:
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.
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.
fricklerhandwerk
added
UX
The way in which users interact with Nix. Higher level than UI.
language
The Nix expression language; parser, interpreter, primops, evaluation, etc
and removed
stale
labels
Sep 13, 2022
Various functionality provided by Nix tools and builtins relies on the presence and "correct" functionality of external tools.
This seems... unfortunate 😇 .
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? :)
The text was updated successfully, but these errors were encountered: