Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gitAndTools.transcrypt: add dependencies #56247

Merged
merged 2 commits into from May 18, 2019

Conversation

hyperfekt
Copy link
Contributor

@hyperfekt hyperfekt commented Feb 23, 2019

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
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@hyperfekt hyperfekt force-pushed the transcrypt_dependencies branch 2 times, most recently from bfa742a to c91ad79 Compare February 23, 2019 19:22
adds a tool to get the paths of the dependencies needed by the helper scripts
(which are written only once and are never updated) to the output and patches
them to use it expand their path
@Lassulus
Copy link
Member

tested with nix-review, everything still seems to work

@Lassulus Lassulus merged commit de5a9de into NixOS:master May 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants