This reverts commit ac637ef21e. The original PR (https://github.com/NixOS/nixpkgs/pull/289522) broke the `pkgs/by-name` check on master, so it was reverted in https://github.com/NixOS/nixpkgs/pull/289655. This reapplies the original commits and makes sure that the `pkgs/by-name` check works by moving it out of `pkgs/by-name`.
ac637ef21e