The unnecessary rebuilds make development work excruciating; it takes over 5 minutes to unpack and build the 1600 dependencies of one tool on my machine.
The node-packages.nix file that is generated uses nix-gitignore.gitignoreSourcePure, which uses builtins.filterSource.
As Built-in Functions in the nix manual points out, filterSource should not be called on store paths, but that is exactly what gitignoreSourcePure does, here (I suspect this might be a change with flakes; it's certainly a fragility).
The unnecessary rebuilds make development work excruciating; it takes over 5 minutes to unpack and build the 1600 dependencies of one tool on my machine.
The
node-packages.nix
file that is generated usesnix-gitignore.gitignoreSourcePure
, which usesbuiltins.filterSource
. As Built-in Functions in the nix manual points out,filterSource
should not be called on store paths, but that is exactly whatgitignoreSourcePure
does, here (I suspect this might be a change with flakes; it's certainly a fragility).There are alternative options explored in https://discourse.nixos.org/t/filtering-source-trees-with-nix-and-nixpkgs/19148; I dislike the favoured one as it uses IFD, which is unnecessary.
In an override file, I was able to call
override
on thenodeDependencies
attr (using theargs
attr, too),This should be ok, as far as I can tell, but I have not thoroughly explored the difference, hence why I've opened an issue rather than a PR.