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

nixos/programs.npm: Fix rebuild of nixos system #85581

Closed
wants to merge 3 commits into from

Conversation

calbrecht
Copy link
Member

@calbrecht calbrecht commented Apr 19, 2020

Motivation for this change

PR #84599 introduced an option
that breaks rebuilding nixos in case that user has set nodePackages to a different
version than nodePackages_10_x. The package attribute npm is not part of any other
nodePackages version than version 10.

This commit makes sure nixos may be build by users who set their nodePackages to a different
version and do not want to have programs npm enabled.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

MR NixOS#84599 introduced an option 
that breaks rebuilding nixos in case that user has set nodePackages to a different
version than nodePackages_10_x. The package attribute npm is not part of any other
nodePackages version than version 10.

This commit makes sure nixos may be build by users who st their nodePackages to a different
version and do not want to have programs npm enabled.
@calbrecht
Copy link
Member Author

@doronbehar :) Could you review this?

@doronbehar
Copy link
Contributor

I understand now what you tried to explain in #84599 . I think the proper fix for this would be to add the npm attribute to all nodePackages* sets. There's an infinite number of overlays users can apply that might break modules. We can't ever make all of NixOS' modules compatible with every one of them. On the other hand, we should make all sets such as nodePackages and nodePackages_10_x have the same attributes.

I'm afraid @calbrecht this is my last advice, I can't help you further as I need a break from contributing here. I have other more important tasks for the few up coming months so I shouldn't be seen here. Please don't @quote me or invite me to review PRs.

Copy link
Member

@Ma27 Ma27 left a comment

Choose a reason for hiding this comment

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

@calbrecht when submitting changes, please write a commit-message that is compliant with nixpkgs' contribution guidelines.

nixos/modules/programs/npm.nix Outdated Show resolved Hide resolved
nixos/modules/programs/npm.nix Outdated Show resolved Hide resolved
@calbrecht calbrecht changed the title Fix rebuild of nixos system nixos/programs.npm: Fix rebuild of nixos system Apr 20, 2020
@calbrecht
Copy link
Member Author

@calbrecht when submitting changes, please write a commit-message that is compliant with nixpkgs' contribution guidelines.

done.

@stale
Copy link

stale bot commented Nov 11, 2020

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Nov 11, 2020
@DamienCassou
Copy link
Contributor

Because this issue is marked as stale for so long I'm closing it. Feel free to reopen it if it makes sense.

@calbrecht calbrecht deleted the patch-1 branch January 4, 2024 23:01
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.

None yet

5 participants