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

Avoid binary file corruption in nixpkgs_local_repository #159

Merged
merged 2 commits into from
Mar 22, 2021

Conversation

guibou
Copy link
Contributor

@guibou guibou commented Mar 21, 2021

This closes #136

repository_ctx is meant to work on "text" files and does text encoding
and decoding, which breaks in the context of a binary file.

There is no cp API in repository_ctx, as suggested in
bazelbuild/bazel#11858, but
bazelbuild/bazel#11857 suggested to use this
approach with repository_ctx.file.

This closes #136

`repository_ctx` is meant to work on "text" files and does text encoding
and decoding, which breaks in the context of a binary file.

There is no `cp` API in repository_ctx, as suggested in
bazelbuild/bazel#11858, but
bazelbuild/bazel#11857 suggested to use this
approach with `repository_ctx.file`.
@guibou guibou requested review from mboes and aherrmann March 21, 2021 18:14
@guibou guibou changed the title Correctly copy binary files in nixpkgs_local_repository Avoid binary file corruption in nixpkgs_local_repository Mar 21, 2021
@guibou guibou mentioned this pull request Mar 21, 2021
nixpkgs/nixpkgs.bzl Outdated Show resolved Hide resolved
Co-authored-by: Théophane Hufschmitt <regnat@users.noreply.github.com>
Copy link
Member

@aherrmann aherrmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@aherrmann aherrmann added the merge-queue merge on green CI label Mar 22, 2021
@mergify mergify bot merged commit 9aa021b into master Mar 22, 2021
@mergify mergify bot deleted the fix_corrupted_copy branch March 22, 2021 09:13
@mergify mergify bot removed the merge-queue merge on green CI label Mar 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nixpkgs_package is corrupting binary files
3 participants