Skip to content

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

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

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.

Sorry, something went wrong.

Verified

This commit was signed with the committer’s verified signature. The key has expired.
lsix lsix
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?

@ofborg ofborg bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 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 Apr 19, 2020
@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.

@calbrecht calbrecht changed the title Fix rebuild of nixos system nixos/programs.npm: Fix rebuild of nixos system Apr 20, 2020
@ofborg ofborg bot added 10.rebuild-linux: 1-10 10.rebuild-linux: 1 and removed 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels 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
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: nodejs 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants