Conversation
Notices
-
Oh, ok! I thought overrideDerivation overrode the mkDerivation call, but it actually overrides the underlying derivation. Overriding the mkDerivation call is what overrideAttrs does. Basically I always want overrideAttrs and I've always been using overrideDerivation. A lot of the times it makes no difference, but then you suddenly get really confused.
-
Also don't miss lib.addMetaAttrs:
> lib.addMetaAttrs { platforms = drv.meta.platforms ++ [ "x86_64-darwin" ] } drv
is a bit neater than having to go all:
> drv.overrideAttrs (oldAttrs: { meta = oldAttrs.meta // { platforms = oldAttrs.meta.platforms ++ [ "x86_64-darwin" ]; }; })
#nix