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

gzip: use makeShellWrapper instead of makeWrapper #351097

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

Cynerd
Copy link
Contributor

@Cynerd Cynerd commented Oct 25, 2024

makeWrapper is in default makeShellWrapper but sometimes it is beneficial to switch it in overlay to makeBinaryWrapper, but gzip is injecting shell expansion that doesn't work binary wrapper. Thus this takes shell wrapper explicitly as a dependency now.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

makeWrapper is in default makeShellWrapper but sometimes it is
beneficial to switch it in overlay to makeBinaryWrapper, but gzip is
injecting shell expansion that doesn't work binary wrapper. Thus this
takes shell wrapper explicitly as a dependency now.
@Cynerd Cynerd requested a review from Artturin October 25, 2024 07:16
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Oct 25, 2024
@SuperSandro2000
Copy link
Member

sometimes it is beneficial to switch it in overlay to makeBinaryWrapper, but gzip is injecting shell expansion that doesn't work binary wrapper.

You can always override in the overlay. Why isn't that enough here?

@Cynerd
Copy link
Contributor Author

Cynerd commented Oct 25, 2024

sometimes it is beneficial to switch it in overlay to makeBinaryWrapper, but gzip is injecting shell expansion that doesn't work binary wrapper.

You can always override in the overlay. Why isn't that enough here?

Yes, I can, and that is what I am doing. The issue is that if you do not know about it and thus do not do it, you get pretty cryptic errors when fetching packages (gzip: ${GZIP_NO_TIMESTAMPS:+-n}.gz: No such file or directory). I think that if the package relies on the wrapper being a shell, then it should explicitly pull in the shell variant and not rely on it being the default option.

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Oct 26, 2024
@FliegendeWurst FliegendeWurst merged commit e84636c into NixOS:master Dec 20, 2024
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux 12.approvals: 1 This PR was reviewed and approved by one reputable person
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants