Some projects choose to not depend on nixpkgs for a variety of reasons.
Such projects often re-implement library function just to work around that restriction.
Trying to alleviate the bending-over-backwards I’ve seen out in the wild, I set up a github workflow that extracts lib from NixOS/nixpkgs every Sunday.
For the interested parties, @Pacman99 derived a valid use case for divnix/nixpkgs.lib that on my quick opinion cannot be implemented via a NixOS/nixpkgs/lib/flake.nix in:
Since flake inputs are lazily fetched, it might make sense for example for a library flake (like the above) to even declare nixpkgs.lib + nixpkgs (for pkgs) in parrallel.
That’s what “cheaper” in the title of this thread stands for.
Edit: the github workflow seems to do a great job.