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

treewide: improve prepending and appending derivation arguments in bash code #357052

Merged

Conversation

wolfgangwalther
Copy link
Contributor

Those would be problematic with __structuredAttrs turned on, because they'd turn those nice bash arrays back into strings - and potentially lose some of the values on the way.

Part of the overall effort to enable structuredAttrs by default eventually, tracking: #205690

I think those changes are straight-forward, but somebody better double check.

@ShamrockLee @emilazy

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/)
  • 25.05 Release Notes (or backporting 24.11 and 25.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.

@emilazy
Copy link
Member

emilazy commented Nov 18, 2024

BTW, something that was pointed out to me is that placeholder doesn’t work nicely inside a development shell. (Not saying this is blocking or anything, just worth considering – and ideally something we would fix somehow at another layer.)

@wolfgangwalther
Copy link
Contributor Author

I went through this PR line-by-line again, LGTM. Can't approve myself, though ;)

Copy link
Member

@emilazy emilazy left a comment

Choose a reason for hiding this comment

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

LGTM modulo a couple nits.

pkgs/by-name/un/unbound/package.nix Outdated Show resolved Hide resolved
pkgs/development/libraries/webkitgtk/default.nix Outdated Show resolved Hide resolved
@wolfgangwalther wolfgangwalther force-pushed the structured-attrs-flag-handling-staging branch 2 times, most recently from 9444c3b to 1c2a5af Compare November 23, 2024 11:26
@wolfgangwalther
Copy link
Contributor Author

No idea why Outpaths (aarch64-darwin) suddenly fails after rebasing.

@wolfgangwalther wolfgangwalther force-pushed the structured-attrs-flag-handling-staging branch from 1c2a5af to f81eada Compare November 23, 2024 19:13
@wolfgangwalther
Copy link
Contributor Author

No idea why Outpaths (aarch64-darwin) suddenly fails after rebasing.

Just running it once more fixed it.

@wolfgangwalther
Copy link
Contributor Author

LGTM modulo a couple nits.

@emilazy in case you are ok with this PR as well: ofborg-eval passed.

Copy link
Contributor

@Mindavi Mindavi left a comment

Choose a reason for hiding this comment

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

LGTM, great to see the structuredAttrs support getting more in shape. Also generally a nice cleanup of all those little accumulated hacks.

@wolfgangwalther wolfgangwalther force-pushed the structured-attrs-flag-handling-staging branch from f81eada to 801fe2c Compare November 25, 2024 08:07
…sh code

Those would be problematic with __structuredAttrs turned on, because
they'd turn those nice bash arrays back into strings - and potentially
lose some of the values on the way.
@wolfgangwalther wolfgangwalther force-pushed the structured-attrs-flag-handling-staging branch from 801fe2c to d86588d Compare November 25, 2024 08:09
@NixOS NixOS deleted a comment from Mj-q8 Nov 25, 2024
@NixOS NixOS deleted a comment from Mj-q8 Nov 25, 2024
@emilazy emilazy merged commit 3958935 into NixOS:staging Nov 25, 2024
16 of 17 checks passed
@wolfgangwalther wolfgangwalther deleted the structured-attrs-flag-handling-staging branch November 25, 2024 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants