-
Notifications
You must be signed in to change notification settings - Fork 551
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
Replace /bin/cp with cp for nix-build #730
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.
Please merge this to get one step closer to pure reproducible builds using Nix.
@sbellem would you mind adding this commit veehaitch@f3c0892? Patching the |
@lzha101 anything we can do to get this merged? |
When using nix-build, /bin/cp cannot be found as there's nothing under /bin except for sh. Signed-off-by: Sylvain Bellemare <sbellem@gmail.com>
Signed-off-by: Vincent Haupert <mail@vincent-haupert.de>
Added commit veehaitch@f3c0892 |
Note that we are using Nix instead of NixOS for reproducible build of several components only. So SGX code doesn't have such problem. |
Thanks for merging this PR! 🙏🏻
Please note that this change helps you as much as anybody else using Nix to build your software and is not related to NixOS. In fact, it is necessary to have proper reproducibility. You just didn't run into problems with regard to absolute paths to binaries as you have been using Nix on an Ubuntu host with sandboxing disabled:
From the
Sandboxing is enabled by default. Disabling it means your Nix builds are not hermetic and might contain additional impurities. Against this background, avoiding absolute FHS paths is even a prerequisite for having proper reproducible builds using Nix. |
When using nix-build, /bin/cp cannot be found as there's nothing under
/bin except for sh.
Signed-off-by: Sylvain Bellemare sbellem@gmail.com
Unless there's a good reason to keep
/bin/cp
, it seems that simply usingcp
is preferable as suggested in https://discourse.nixos.org/t/bin-cp-cannot-be-found-when-using-nix-build/13683/2.