Skip to content

Comments

stdenvBootstrapTools: in darwin, only run install_name_tool on Mach-O files#243440

Merged
wegank merged 1 commit intoNixOS:staging-nextfrom
tjni:bootstrap-tools-test
Jul 15, 2023
Merged

stdenvBootstrapTools: in darwin, only run install_name_tool on Mach-O files#243440
wegank merged 1 commit intoNixOS:staging-nextfrom
tjni:bootstrap-tools-test

Conversation

@tjni
Copy link
Contributor

@tjni tjni commented Jul 14, 2023

Description of changes

The Darwin stdenv rework (#240433) switches as to be the Clang assembler, but it is wrapped in a shell script. We need to update the Darwin bootstrap test to skip running install_name_tool on it, since it fails when given a file that is not a Mach-O binary. The tests seem to pass regardless.

I'm not sure I should be (or can) use the file command for this purpose. Open to feedback on how to make this better.

Relevant for staging-next: #241951

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.

@github-actions github-actions bot added the 6.topic: stdenv Standard environment label Jul 14, 2023
@ofborg ofborg bot added 6.topic: darwin Running or building packages on Darwin 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 14, 2023
@NickCao
Copy link
Member

NickCao commented Jul 14, 2023

We have an isMachO helper in stdenv.

@reckenrode reckenrode mentioned this pull request Jul 14, 2023
1 task
@tjni
Copy link
Contributor Author

tjni commented Jul 14, 2023

Wow, that's a cool function. Thank you, @NickCao.

@tjni tjni mentioned this pull request Jul 14, 2023
12 tasks
@wegank wegank merged commit 4a6c701 into NixOS:staging-next Jul 15, 2023
@tjni tjni deleted the bootstrap-tools-test branch July 15, 2023 10:34
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