gitAndTools.transcrypt: add dependencies #56247
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation for this change
The transcrypt script had some hidden dependencies which I added.
It also writes some helper scripts to repositories it initializes, which have openssl, coreutils and awk as dependencies.
Until now, they simply took their dependencies from $PATH, which can fail if they aren't installed (as was the case on my system with openssl).
These helper scripts are only written once, which means any store paths in them wouldn't be updated - and as a consequence they would become outdated or even unavailable over time.
transcrypt has the guarantee that the encryption continues to work even if it isn't installed, which, if we want to uphold it, complicates the matter.
If we decide not to uphold that guarantee, pointers to the dependencies could be included in the transcrypt directory (as a form of forced runtime dependency) which the scripts could look up via the $PATH.
If we want to keep that guarantee, the situation is more complicated,
but I've created a patch that does so.To work around the issue I have wrapped the helper scripts so they try and invoke nix-shell (if available) to add the required dependencies to their $PATH.
I decided I'd rather drop the guarantee but have the correct versions of packages instead of the latest from whatever channel is active, since those scripts are never shared with anyone and having transcrypt installed is necessary for some pretty essential operations, anyway.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)