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

nodePackages: add script to remove attrs for aliases #230782

Merged

Conversation

lilyinstarlight
Copy link
Member

Description of changes

Follow-up to #229639

Regenerating the entire nodePackages package set takes ages and editing the file by hand is difficult

Instead this provides a script to remove packages without regenerating, to make it easier to alias and migrate stuff out of the set

This is a really dumb format-dependent script, but I doubt node2nix is ever going to see changes again that would make this a problem since we are actively trying to move away from it

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.05 Release Notes (or backporting 22.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.

Regenerating the entire package set takes ages and editing the file by
hand is difficult. Instead we provide a script to remove packages
without regenerating to make it easy.
@lilyinstarlight lilyinstarlight mentioned this pull request May 8, 2023
12 tasks
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels May 9, 2023
Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

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

Just to verify: you tested this by removing a package with a complex name like @foo/buzbar?

@lilyinstarlight
Copy link
Member Author

Just to verify: you tested this by removing a package with a complex name like @foo/buzbar?

Yes, I tested it with @nestjs/cli before #229692 was merged

@lilyinstarlight
Copy link
Member Author

I just tested it with @emacs-eask/cli to be sure. I also just added a commit since technically the python file reformats the node-packages.json file and one line is not quite in a consistent format compared to the rest

@mweinelt mweinelt added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label May 10, 2023
@lilyinstarlight lilyinstarlight merged commit 7b2c4fc into NixOS:master May 21, 2023
@lilyinstarlight lilyinstarlight deleted the feature/node-aliases-better branch May 21, 2023 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nodejs 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux 12.approvals: 1 This PR was reviewed and approved by one reputable person
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants