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
diskrsync: add ssh to PATH #37969
diskrsync: add ssh to PATH #37969
Conversation
I'm not sure if this wrapping is done correctly. For instance, does the metadata propagate properly to the wrapped package? |
makeWrapper \ | ||
${diskrsync}/bin/diskrsync \ | ||
$out/bin/diskrsync \ | ||
--prefix PATH : ${openssh}/bin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use wrapProgram
instead in the preFixup
phase of the original derivation instead in runCommand
: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/tools/nrpl/default.nix#L32
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But that would cause unnecessary re-compilation of the Go package when just the runtime-only dependency SSH changes. Doesn't sound right to me...
These are micro-optimization that hurt maintainability and probably do not even pay of:
Your |
Ok! In that case, is |
It would only propagate in the context of a build or in a nix-shell, not if someone installs the package. Therefore a wrapper is the way to go. |
Ok, thanks for the explanation. I'll make the suggested fix. |
Well this is weird.. I tried prePatch phase but
So there is no |
Ah, the executable is in |
SSH is a required runtime-only dependency of Diskrsync. This adds SSH to PATH by by using a wrapper.
Ok, made the fix. Good to merge now? |
Motivation for this change
SSH is a required runtime-only dependency of Diskrsync. This adds SSH to PATH by
using a wrapper.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)