I've just read this in the NixOS 22.05 release notes:
stdenv.mkDerivation now supports a self-referencing finalAttrs: parameter containing the final mkDerivation arguments including overrides. drv.overrideAttrs now supports two parameters finalAttrs: previousAttrs:. This allows packaging configuration to be overridden in a consistent manner by providing an alternative to rec {} syntax.
Additionally, passthru can now reference finalAttrs.finalPackage containing the final package, including attributes such as the output paths and overrideAttrs.
New language integrations can be simplified by overriding a “prototype” package containing the language-specific logic. This removes the need for a extra layer of overriding for the “generic builder” arguments, thus removing a usability problem and source of error.
It looks like it could be relevant to mkCoqDerivation, e.g., to avoid this typical issue.
@Vincent Laporte @Cyril Cohen WDYT?
Sounds interesting. Thanks for pointing this out.
Last updated: Oct 08 2024 at 16:02 UTC