query
On this page

addAttrsToDerivation

pkgs.addAttrsToDerivation

Docs pulled from | This Revision | 1 day ago


Modify a stdenv so that the specified attributes are added to every derivation returned by its mkDerivation function.

Example: stdenvNoOptimise = addAttrsToDerivation { env.NIX_CFLAGS_COMPILE = "-O0"; } stdenv;


Noogle detected

Implementation

The following is the current implementation of this function.

addAttrsToDerivation =
    extraAttrs: stdenv:
    stdenv.override (old: {
      mkDerivationFromStdenv = extendMkDerivationArgs old (_: extraAttrs);
    });