Hi all,
I’m hitting this error when trying to enter my dev shell from a flake.nix on nixpkgs-unstable ![]()
error: nodePackages has been removed because it was unmaintainable within nixpkgs
The offending line in my flake is nodePackages.pnpm inside a mkShell:
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
};
outputs =
{ nixpkgs, ... }:
let
forAllSystems =
function:
nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed (
system: function nixpkgs.legacyPackages.${system}
);
in
{
formatter = forAllSystems (pkgs: pkgs.alejandra);
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
packages = with pkgs; [
corepack
bun
nodejs_22
nodePackages.pnpm
postgresql
git
deno
];
};
});
};
}
A couple of questions:
-
Is replacing
nodePackages.pnpmwith the top-levelpnpmthe correct migration path? -
Is there a comprehensive list or tracking issue for which
nodePackages.*attrs have been promoted to top-level vs. simply removed? -
For packages that were dropped entirely, is
buildNpmPackagethe recommended approach, or are there better alternatives? -
What was the reasoning behind removing the entire
nodePackagesset rather than deprecating individual broken packages? Should we be concerned about similar bulk removals in other package sets (e.g.,pythonPackages,perlPackages)?
I found this nixpkgs issue about repackaging withbuildNpmPackage, but I couldn’t find clear migration docs. Any pointers would be appreciated.
Thanks!