Skip to content

darwin.stdenv: clean up portable libsystem hook#242399

Merged
wegank merged 2 commits intoNixOS:masterfrom
reckenrode:portable-libsystem-fix
Jul 9, 2023
Merged

darwin.stdenv: clean up portable libsystem hook#242399
wegank merged 2 commits intoNixOS:masterfrom
reckenrode:portable-libsystem-fix

Conversation

@reckenrode
Copy link
Contributor

Description of changes

I noticed this while building #242316. The hook fails to find install_name_tool when sandboxing is enabled. I also cleaned up an install_name_tool failure due to trying to run it on $out/bin itself.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • 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/)
  • 23.11 Release Notes (or backporting 23.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.

When sandboxing is enabled, the hook tries to run `install_name_tool`
and fails because the system one is inaccessible. Having it use
`targetPrefix` allows it to find and use the cross-install_name_tool.
@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Jul 9, 2023
@github-actions github-actions bot added the 6.topic: stdenv Standard environment label Jul 9, 2023
@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 Jul 9, 2023
Copy link
Contributor

@tjni tjni left a comment

Choose a reason for hiding this comment

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

Thanks for leaving detailed commit messages. This makes sense and looks good to me.

@reckenrode
Copy link
Contributor Author

Result of nixpkgs-review pr 242399 run on aarch64-darwin 1

2 packages built:
  • nixStatic
  • nixStatic.dev

@wegank wegank merged commit cfab6ff into NixOS:master Jul 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: darwin Running or building packages on Darwin 6.topic: stdenv Standard environment 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments