For convenience, you can also use pname and version attributes and mkDerivation will automatically set name to "${pname}-${version}" by default.
The error messages are not helpful when one messes up the input attribute set ofmkDerivation
(i.e., either name
, or pname
and version
attributes have to be present); see Nixpkgs issue #113520.