Skip to content

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

Merged
emilazy merged 2 commits intoNixOS:stagingfrom
wolfgangwalther:structured-attrs-flag-handling-staging
Nov 25, 2024
Merged

treewide: improve prepending and appending derivation arguments in bash code#357052
emilazy merged 2 commits intoNixOS:stagingfrom
wolfgangwalther:structured-attrs-flag-handling-staging

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.

@github-actions github-actions bot added 6.topic: python Python is a high-level, general-purpose programming language. 6.topic: haskell General-purpose, statically typed, purely functional programming language 6.topic: qt/kde Object-oriented framework for GUI creation 6.topic: TeX Issues regarding texlive and TeX in general 6.topic: lua Lua is a powerful, efficient, lightweight, embeddable scripting language. 6.topic: cuda Parallel computing platform and API labels Nov 18, 2024
@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.)

@ofborg ofborg bot added 10.rebuild-linux-stdenv This PR causes stdenv to rebuild on Linux 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: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Nov 19, 2024
@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.

@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
@wolfgangwalther wolfgangwalther deleted the structured-attrs-flag-handling-staging branch November 25, 2024 14:02
@mjoerg mjoerg mentioned this pull request Dec 28, 2024
13 tasks
@accelbread accelbread mentioned this pull request Dec 29, 2024
13 tasks
@jian-lin
Copy link
Contributor

Please review #368865.

jian-lin pushed a commit that referenced this pull request Dec 29, 2024
The build of glibcInfo has been broken since
d86588d (from #357052).

The common derivation had a makeFlags added which the info derivation
was overriding. The manual says build targets should be put in
buildFlags instead of makeFlags anyways, and doing so removes the
conflict.
mjoerg added a commit to mjoerg/nixpkgs that referenced this pull request Dec 29, 2024
fixes regression introduced in NixOS#357052
jian-lin pushed a commit to linj-fork/nixpkgs that referenced this pull request Dec 29, 2024
The build of glibcInfo has been broken since
d86588d (from NixOS#357052).

The common derivation had a makeFlags added which the info derivation
was overriding. The manual says build targets should be put in
buildFlags instead of makeFlags anyways, and doing so removes the
conflict.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: cuda Parallel computing platform and API 6.topic: haskell General-purpose, statically typed, purely functional programming language 6.topic: lua Lua is a powerful, efficient, lightweight, embeddable scripting language. 6.topic: python Python is a high-level, general-purpose programming language. 6.topic: qt/kde Object-oriented framework for GUI creation 6.topic: TeX Issues regarding texlive and TeX in general 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: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 10.rebuild-linux-stdenv This PR causes stdenv to rebuild on Linux and must target a staging branch.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

7 participants