Skip to content

treewide: support structuredAttrs in setup hooks (part 3)#340592

Merged
philiptaron merged 12 commits intoNixOS:stagingfrom
wolfgangwalther:structured-attrs-setup-hooks-part3
Sep 11, 2024
Merged

treewide: support structuredAttrs in setup hooks (part 3)#340592
philiptaron merged 12 commits intoNixOS:stagingfrom
wolfgangwalther:structured-attrs-setup-hooks-part3

Conversation

@wolfgangwalther
Copy link
Contributor

Description of changes

This is a second follow up to #318614, which had a lot more commits initially, similar to the first one in #335666. For context, please see those PRs.

For some of the commits in this PR, I was able to find some packages to test with/without structuredAttrs similar to the PRs before, but not all of them. The changes should be straight-forward by now anyway, using the other two PRs as reference.

After this PR, there are only a few more hooks left on my list, but I will open individual PRs for those later.

CC @emilazy @philiptaron @tie

Since the changed setup hooks won't trigger ofborg to mention the maintainers:

Things done

  • Built on platform(s)
    • x86_64-linux (all except xcbuild, darwin.libutil)
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin (xcbuild, darwin.libutil)
  • 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.

Currently no problematic package using multiple swiftpmFlags in nixpkgs
to test.
Tested atlauncher with and without structuredAttrs.
Tested darwin.libutil with and without structuredAttrs.
cudaPackages already builts with structuredAttrs, but the cmakeFlags+=
pattern incorrectly appends the additional flags to the first array
argument with a space - which is now part of that argument itself since
NixOS#318614, which added support for structuredAttrs to cmake.
This is required to test netbsd.compat with structuredAttrs turned on
once the setup hooks support it.
Tested netbsd.compat with and without structuredAttrs.
Tested netbsd.lorder with and without __structuredAttrs.
Tested openbsd.lorder with and without __structuredAttrs.
Couldn't test this, because freebsd.compat is failing with unrelated
errors for me.
@github-actions github-actions bot added the 6.topic: qt/kde Object-oriented framework for GUI creation label Sep 8, 2024
@reckenrode
Copy link
Contributor

reckenrode commented Sep 8, 2024

xcbuild changes look fine. They match (more or less) what I’ve done in my Darwin refactor branch.

Another good test case on Darwin is MoltenVK. Its scheme has spaces, which doesn’t work without structured attrs.

Ignore the new SDK stuff, but this is what it should look like when it can use xcbuildHook: https://github.com/reckenrode/nixpkgs/blob/darwin-sdk-refactor/pkgs/os-specific/darwin/moltenvk/default.nix#L131-L142

@ofborg ofborg bot added 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 1001-2500 This PR causes many rebuilds on Linux and should target the staging branches. labels Sep 8, 2024
@philiptaron philiptaron requested a review from artemist September 8, 2024 22:34
@philiptaron
Copy link
Contributor

Adding @artemist for the *bsd bits. Please feel free to add whomever you think else might be the right person(s) to review!

Copy link
Contributor

@philiptaron philiptaron left a comment

Choose a reason for hiding this comment

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

The changes to all but *BSD look quite straightforward to me.

@artemist
Copy link
Member

artemist commented Sep 8, 2024

Nothing looks super out of place with BSD, though I haven't tested it. I think @rhelmot has dealt with the setup hook more

Copy link
Contributor

@K900 K900 left a comment

Choose a reason for hiding this comment

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

ECM looks OK

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one person. label Sep 9, 2024
@philiptaron
Copy link
Contributor

Barring any objections, I'd like to merge this in a day or less.

@philiptaron philiptaron merged commit d1d2419 into NixOS:staging Sep 11, 2024
@wolfgangwalther wolfgangwalther deleted the structured-attrs-setup-hooks-part3 branch November 3, 2024 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: qt/kde Object-oriented framework for GUI creation 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 1001-2500 This PR causes many rebuilds on Linux and should target the staging branches. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants