Skip to content

darwin.stdenv: drop libssh2 from the bootstrap#276762

Closed
reckenrode wants to merge 1 commit intoNixOS:stagingfrom
reckenrode:darwin-no-libssh2
Closed

darwin.stdenv: drop libssh2 from the bootstrap#276762
reckenrode wants to merge 1 commit intoNixOS:stagingfrom
reckenrode:darwin-no-libssh2

Conversation

@reckenrode
Copy link
Contributor

Description of changes

curlMinimal includes scp support, but Darwin doesn’t need it. Disabling it removes libssh2 as a bootstrap dependency, allowing it to be updated without forcing a full rebuild of Darwin.

Targeting staging due to rebuilds (this one last time).

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/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 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.

curlMinimal includes scp support, but Darwin doesn’t need it. Disabling
it removes libssh2 as a bootstrap dependency, allowing it to be updated
without forcing a full rebuild of Darwin.
@github-actions github-actions bot added the 6.topic: stdenv Standard environment label Dec 25, 2023
@reckenrode
Copy link
Contributor Author

Prompted by the rebuilds due to #275641.

@ofborg ofborg bot added 6.topic: darwin Running or building packages on Darwin 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin 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: 0 This PR does not cause any packages to rebuild on Linux. labels Dec 25, 2023
@vcunat
Copy link
Member

vcunat commented Dec 29, 2023

Maybe curlMinimal should not support SCP by default? It certainly feels surprising to me.

@reckenrode
Copy link
Contributor Author

Maybe curlMinimal should not support SCP by default? It certainly feels surprising to me.

Probably not for a few reasons:

  1. Changing the default is technically a breaking change. This seems theoretical because it would require users to be using curlMinimal for its SCP support, but it’s possibly they may; hence technically a breaking change.
  2. curl is defined as an override of curlMinimal. Changing the default for curlMinimal affects curl.

The latter in particular requires either duplicating the condition for enabling SCP in all-packages.nix, which is probably not the right approach, or redefining curlMinimal from curl instead of the other way around.

I tried the latter approach locally, but it results in an infinite recursion in the Darwin stdenv bootstrap because the bootstrap defines curl as super.curlMinimal. Fixing it requires duplicating the curlMinimal definition in the bootstrap.

Just changing the override in the Darwin stdenv bootstrap is the least invasive change to drop libssh2 from it. If Darwin is ever able to drop curl completely from the bootstrap, then it might be worth revisiting how curl is defined. For now, I’d prefer to keep the change localized to the bootstrap.

@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Apr 5, 2024
@vcunat
Copy link
Member

vcunat commented Apr 22, 2024

Should be closed by PR #276762 on a quick glance.

@vcunat vcunat closed this Apr 22, 2024
@reckenrode reckenrode deleted the darwin-no-libssh2 branch April 22, 2024 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: merge conflict This PR has merge conflicts with the target branch 6.topic: darwin Running or building packages on Darwin 6.topic: stdenv Standard environment 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-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants