It is the other way around. overrideAttrs
modifies the attributes passed to stdenv.mkDerivation
, while override
modifies the arguments passed to the package function by lib.callPackage
.
There are some other attribute sets that contain different override function, for example, python3.pkgs.buildPythonPackage
uses overridePythonAttrs
, stuff created using lib.makeOverridable
like the packages in nodePackages
use override
(this is probably where your confusion comes from)…
There is a RFC to get these functions more under control: [RFC 0067] Common override interface derivations by FRidh · Pull Request #67 · NixOS/rfcs · GitHub