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

stdenv: enable __structuredAttrs #72074

Closed
wants to merge 337 commits into from
Closed

stdenv: enable __structuredAttrs #72074

wants to merge 337 commits into from

Conversation

globin
Copy link
Member

@globin globin commented Oct 27, 2019

__structuredAttrs is a nice feature, we want it enabled in stdenv!

hydra jobset: https://hydra.nixos.org/jobset/nixpkgs/structured-attrs

related: NixOS/rfcs#13

Further information: https://nixos.mayflower.consulting/blog/2020/01/20/structured-attrs/

cc @Ericson2314 @matthewbauer

@jtojnar
Copy link
Contributor

jtojnar commented Oct 30, 2019

Why not make the NIX_*_FLAGS be lists as well?

@globin
Copy link
Member Author

globin commented Oct 30, 2019

They need to be exported to be picked up by bintools-/cc-wrapper

@Ericson2314
Copy link
Member

@globin we could require that they be lists, but then convert to strings (and quote!) ourselves. If that is not more churn, I think i might prefer that.

@Ericson2314
Copy link
Member

I added set -u as I got that ready/pretty close, and ensured at least stdenv built after the merge. Also fixed an eval failure.

@@ -827,7 +827,7 @@ unpackFile() {
unpackPhase() {
runHook preUnpack

if [ -z ${srcs+"${srcs[@]}"} ]; then
if [ -z ${srcs-"${srcs[@]}"} ]; then
Copy link
Member

Choose a reason for hiding this comment

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

Intentional?

Copy link
Contributor

Choose a reason for hiding this comment

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

${srcs-"${srcs[@]}"} expands to the first element of the srcs array; surely that’s not the intention.

Suggested change
if [ -z ${srcs-"${srcs[@]}"} ]; then
if [ ${#srcs[@]} = 0 ]; then

@vcunat vcunat modified the milestones: 21.05, 21.11 Apr 30, 2021
@github-actions github-actions bot removed 6.topic: stdenv Standard environment 6.topic: printing 6.topic: TeX Issues regarding texlive and TeX in general 6.topic: bsd Running or building packages on BSD 6.topic: systemd 6.topic: vim 6.topic: steam labels May 24, 2021
@Mindavi
Copy link
Contributor

Mindavi commented Oct 13, 2021

Is there still time to push this in? If not, is there any way this can be split up to make it more bearable to get this in? Otherwise this will be pushed forward indefinitely, I'm afraid.

@Artturin
Copy link
Member

Artturin commented Oct 14, 2021

i think a way to help could be:
fork nixpkgs and checkout the structured-attrs branch
run git rebase -i origin/master and solve the merge conflicts (300 or so)
this should also clean up the commit list and order it

@Artturin
Copy link
Member

what if we created a structuredAttrsStdenv and migrated expressions gradually?

@Mindavi
Copy link
Contributor

Mindavi commented Nov 27, 2021

At least making it so this change can be split up seems like a good idea to me. I don't mind hacking at this, but doing everything at once is very hard to do, it'll also quickly have conflicts.

@Artturin
Copy link
Member

Artturin commented May 4, 2022

@Mindavi I found #85042
Which has structuredAttrs as a opt in

@Artturin
Copy link
Member

#175649

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/cmakeflags-and-spaces-in-option-values/20170/2

@jtojnar jtojnar mentioned this pull request Oct 14, 2022
13 tasks
@Artturin
Copy link
Member

#175649 has been merged

@Artturin Artturin closed this Dec 11, 2022
@Mindavi Mindavi deleted the structured-attrs branch December 11, 2022 11:17
@Mindavi Mindavi restored the structured-attrs branch December 11, 2022 11:18
@wegank wegank deleted the structured-attrs branch May 27, 2023 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet