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
yadm: add missing dependencies #73615
Conversation
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.
Seems reasonable.
By the way, what about yadm encrypt
, that relies on GnuPG? Should it be an optional?
I'm not really sure. Git is really needed for basic functionality but GPG could be considered to be extra? What is the general Nixpkgs policy regarding optional dependencies? |
I'm not sure if there is an official policy, but my feeling is that it is nice to get everything to work by default unless there is some good reason not to, like the optional dependency causes a significant performance overhead. |
ed76407
to
7d33c43
Compare
I also think that when installing a package, everything should work by default. Thus, I added also gpg to buildInputs. Also, maybe the Nixpkgs manual needs to have some mention of optional dependencies, even if a full-on policy would be exaggerating? |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-ready-for-review-may-2019/3032/84 |
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.
I also notice that this package doesn't produce any log when built and the man page isn't compressed. This is because of the custom buildCommand
You could replace the whole buildCommand with:
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall
install -Dt $out/bin $src/yadm
install -Dt $out/share/man/man1 $src/yadm.1
install -D $src/completion/yadm.zsh_completion $out/share/zsh/site-functions/_yadm
install -D $src/completion/yadm.bash_completion $out/share/bash-completion/completions/yadm.bash
runHook postInstall
'';
Then the normal fixup phase would automatically patch any shebang and compress man pages.
Plus the build gets logged which could be useful for checks on Hydra.
This let the fixup phase compress man pages and patch shebangs
Motivation for this change
Yadm was missing a runtime dependency on git.
Things done
Added git to
buildInputs
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers