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

tree-wide: use top-level cctools #328077

Merged
merged 2 commits into from
Jul 18, 2024

Conversation

reckenrode
Copy link
Contributor

Description of changes

This PR is the first follow-up to #307880. It finishes moving darwin.cctools to the top-level by adding darwin.cctools and darwin.cctools-port to darwin-aliases.nix.

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.11 Release Notes (or backporting 23.11 and 24.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.

Add a 👍 reaction to pull requests you find important.

Copy link
Contributor

@paparodeo paparodeo left a comment

Choose a reason for hiding this comment

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

LGTM. looks pretty mechanical, didn't notice any surprises.

@reckenrode
Copy link
Contributor Author

Thanks! Once ofborg confirms evaluation, I’ll merge.

@@ -12,7 +12,7 @@ let
nodeEnv = import ../../development/node-packages/node-env.nix {
inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript;
inherit pkgs nodejs;
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
libtool = if pkgs.stdenv.isDarwin then pkgs.cctools or pkgs.darwin.cctools else null;
Copy link
Member

Choose a reason for hiding this comment

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

Do we really need the or here?

Copy link
Contributor

Choose a reason for hiding this comment

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

good spot -- pkgs.darwin.cctools is now an alias so these should all be removed, i think. there are a number of them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The files with this pattern were generated by node2nix. They were updated by hand, but I will be submitting a patch upstream to make it generate this output (assuming node2nix wants to support older nixpkgs).

The intent with these particular changes was to avoid unnecessary diffs assuming these files will be refreshed at some time in the future with the updated node2nix.

Copy link
Member

Choose a reason for hiding this comment

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

I think you need to apply the patch to node2nix inside nodePackages otherwise we quickly run into problems here.

Copy link
Member

Choose a reason for hiding this comment

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

Also don't we trigger the alias everytime unless people have aliases turned off locally?

Copy link
Contributor Author

@reckenrode reckenrode Jul 18, 2024

Choose a reason for hiding this comment

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

I think you need to apply the patch to node2nix inside nodePackages otherwise we quickly run into problems here.

I can patch the in-tree copy once I have submitted it upstream. I don’t want this PR to cause any rebuilds, so that would be done in a separate PR. (Update: This is done. See #328077 (comment).)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also don't we trigger the alias everytime unless people have aliases turned off locally?

Aren’t they disabled in the ofborg checks, meaning eval will fail unless the aliases aren’t used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Upstream PR for node2nix: svanderburg/node2nix#334
nixpkgs PR for node2nix: #328167

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, ofborg won't have them.

Derp, i forgot that package aliases don't trigger warnings, only options do.

reckenrode added a commit to reckenrode/node2nix that referenced this pull request Jul 18, 2024
cctools was updated and migrated to the `by-name` hierarchy in nixpkgs,
which moves it to the top-level. It is also being added to
`darwin-aliases.nix`, which will make the old name unavailable for use
in nixpkgs. This change preferentially uses the new name while falling
back to the old one for out-of-tree users.

Relevant nixpkgs PRs:
- NixOS/nixpkgs#307880
- NixOS/nixpkgs#328077
@reckenrode reckenrode merged commit 2f07b95 into NixOS:staging Jul 18, 2024
24 checks passed
@reckenrode reckenrode deleted the cctools-darwin-aliases branch July 18, 2024 12:54
@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/16

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.

4 participants