Skip to content

stdenv: cross: updateAutotoolsGnuConfigScriptsHook unconditionally#249071

Closed
ghost wants to merge 2 commits intomasterfrom
unknown repository
Closed

stdenv: cross: updateAutotoolsGnuConfigScriptsHook unconditionally#249071
ghost wants to merge 2 commits intomasterfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Aug 14, 2023

Description of changes

We updateAutotoolsGnuConfigScriptsHook unconditionally in the native bootstrap; there's no reason to conditionalize it here.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • 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/)
  • 23.11 Release Notes (or backporting 23.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.

We updateAutotoolsGnuConfigScriptsHook unconditionally in the native
bootstrap; there's no reason to conditionalize it here.
@github-actions github-actions bot added the 6.topic: stdenv Standard environment label Aug 14, 2023
@ofborg ofborg bot added 6.topic: cross-compilation Building packages on a different platform than they will be used on 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Aug 14, 2023
@ghost ghost marked this pull request as ready for review August 14, 2023 09:59
@ghost ghost requested review from Ericson2314 and matthewbauer as code owners August 14, 2023 09:59
@Ericson2314
Copy link
Copy Markdown
Member

Are you saying it already is an unconditional extra dep in the native bootstrap? Then I don't we need this bit at all!

@ghost
Copy link
Copy Markdown
Author

ghost commented Aug 16, 2023

Are you saying it already is an unconditional extra dep in the native bootstrap?

Not quite. See 3b8e3c1. It is a dependency of native stdenv, and therefore changes to it cause everything everywhere to rebuild. However it is only a direct dependency (i.e. hooks applied) of those packages which are part of stdenv itself.

The point of my comment above was that this PR will not increase the number of rebuilds caused by future gnu-config version bumps.

@Ericson2314
Copy link
Copy Markdown
Member

3b8e3c1#diff-bf918d7f48f6a34a4a1acb33373dee717cff2c3f5503a7ca41d90e5f289faf1eR615 doesn't that line make it part of the final stdenv / used by anything which is built with that stdenv?

Co-authored-by: John Ericson <git@JohnEricson.me>
@ghost ghost marked this pull request as draft August 19, 2023 21:47
@ghost
Copy link
Copy Markdown
Author

ghost commented Aug 19, 2023

3b8e3c1#diff-bf918d7f48f6a34a4a1acb33373dee717cff2c3f5503a7ca41d90e5f289faf1eR615 doesn't that line make it part of the final stdenv / used by anything which is built with that stdenv?

You're right.

I forgot that stdenv doesn't copy stdenv.mkDerivation doesn't prepend defaultNativeBuildInputs to the resulting nativeBuildInputs. The additional dependencies are added in bash, not in Nix code.

I guess they are really propagated native build inputs, propagated from stdenv.

@ghost
Copy link
Copy Markdown
Author

ghost commented Aug 19, 2023

My only remaining concern is that setup.sh tries to be clever and filter out any nativeBuildInputs that can't be executed on the buildPlatform.

In spite of the fact that it's a shell script, Nix believes that gnu-config has a meaningful execution platform associated with it. So it should get ignored at some point if you build a new stdenv with a different buildPlatform.

But I'm having a hard time making this happen.

I need to read findInputs() more closely. Grr, I wish we weren't doing this stuff in bash scripts...

@ghost
Copy link
Copy Markdown
Author

ghost commented Aug 19, 2023

Ah, I see.

You can never change the buildPlatform using pkgs/stdenv/cross.

That explains it.

@ghost ghost marked this pull request as ready for review August 19, 2023 22:16
@ofborg ofborg bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. and removed 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Aug 19, 2023
@ghost ghost closed this Oct 22, 2023
@ghost ghost deleted the pr/stdenv/cross/updateAutotoolsGnuConfigScriptsHook-unconditional branch October 22, 2023 05:36
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: cross-compilation Building packages on a different platform than they will be used on 6.topic: stdenv Standard environment 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant