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

Draft
wants to merge 337 commits into
base: staging
Choose a base branch
from
Draft

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

Ericson2314 commented Oct 30, 2019

@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

Ericson2314 commented Nov 2, 2019

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

@Ericson2314 Ericson2314 Nov 4, 2019

Choose a reason for hiding this comment

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

Intentional?

Copy link
Contributor

@andersk andersk May 4, 2021

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

@github-actions github-actions bot added the 6.topic: TeX Issues regarding texlive and TeX in general label Apr 30, 2021
@vcunat
Copy link
Member

vcunat commented Apr 30, 2021

I assume this PR is complex enough to be considered a "breaking change", right? Therefore not fitting 21.05 schedule anymore.

@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

Artturin commented Nov 27, 2021

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

Artturin commented May 31, 2022

#175649

@nixos-discourse
Copy link

nixos-discourse commented Jul 6, 2022

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment