Skip to content

darwin.stdenv: drop curl from the bootstrap#296750

Merged
reckenrode merged 1 commit intoNixOS:stagingfrom
reckenrode:darwin-nocurl
Mar 22, 2024
Merged

darwin.stdenv: drop curl from the bootstrap#296750
reckenrode merged 1 commit intoNixOS:stagingfrom
reckenrode:darwin-nocurl

Conversation

@reckenrode
Copy link
Contributor

The Darwin bootstrap currently requires curl, but it is not strictly required. The bootstrap requires it for two things:

  • Fetchers; and
  • As a transitive dependency of llvm-manpages (via Sphinx).

For the fetchers, the bootstrap curl can be used. For hatch-vcs, the dependency, its tests can be disabled. Doing this allows curl to be dropped from the Darwin stdenv bootstrap.

Closes #276762.

Tested by building the stdenvs against staging. I then changed the name of curl and did a new build, confirming that it only triggered a rebuild of curl and not the whole stdenv.

Description of changes

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.

The Darwin bootstrap currently requires curl, but it is not strictly
required. The bootstrap requires it for two things:

* Fetchers; and
* As a transitive dependency of llvm-manpages (via Sphinx).

For the fetchers, the bootstrap curl can be used. For hatch-vcs, the
dependency, its tests can be disabled. Doing this allows curl to be
dropped from the Darwin stdenv bootstrap.
@github-actions github-actions bot added the 6.topic: stdenv Standard environment label Mar 17, 2024
@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Mar 17, 2024
@reckenrode
Copy link
Contributor Author

The evaluation issue should be fixed once #295557 is merged.

@ghost
Copy link

ghost commented Mar 18, 2024

So i think you could move forward with this change by removing the overlay

# Specify the desired LLVM version in an overlay to avoid the use of
# mismatching versions.
#
# The llvmPackages that we take things (clang, libc++ and such) from
# is specified explicitly to be llvmPackages_11 to keep the
# bootstrap-tools stable. However, tools like otool,
# install_name_tool and strip are taken straight from stdenv.cc,
# which, after the bump, is a different LLVM version altogether.
#
# The original intent was that bootstrap-tools specified LLVM 11
# exhaustively but it didn't. That should be rectified with this
# PR. As to why stick with 11? That's just to keep the
# bootstrap-tools unchanged.
#
# https://github.com/NixOS/nixpkgs/pull/267058/files#r1390889848
, overlays ? [(self: super: { llvmPackages = super.llvmPackages_11; })]
which is causing the eval failure and then you won't be depending on my change.

@reckenrode
Copy link
Contributor Author

So i think you could move forward with this change by removing the overlay

# Specify the desired LLVM version in an overlay to avoid the use of
# mismatching versions.
#
# The llvmPackages that we take things (clang, libc++ and such) from
# is specified explicitly to be llvmPackages_11 to keep the
# bootstrap-tools stable. However, tools like otool,
# install_name_tool and strip are taken straight from stdenv.cc,
# which, after the bump, is a different LLVM version altogether.
#
# The original intent was that bootstrap-tools specified LLVM 11
# exhaustively but it didn't. That should be rectified with this
# PR. As to why stick with 11? That's just to keep the
# bootstrap-tools unchanged.
#
# https://github.com/NixOS/nixpkgs/pull/267058/files#r1390889848
, overlays ? [(self: super: { llvmPackages = super.llvmPackages_11; })]

which is causing the eval failure and then you won't be depending on my change.

Would changing the overlay affect your PR? If you’re getting close, this one can wait for it.

@ghost
Copy link

ghost commented Mar 18, 2024

Would changing the overlay affect your PR? If you’re getting close, this one can wait for it.

it will not conflict as i remove the overlay as well. my PR is ready to go but i'd like to resolve the open comments before committing.

@reckenrode
Copy link
Contributor Author

@ofborg eval

@ofborg ofborg bot added 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 Mar 21, 2024
@reckenrode reckenrode merged commit b7d77e7 into NixOS:staging Mar 22, 2024
@reckenrode reckenrode deleted the darwin-nocurl branch March 22, 2024 03:42
@nixos-discourse
Copy link

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

https://discourse.nixos.org/t/darwin-updates-news/42249/3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

2 participants