query
On this page

withDefaultHardeningFlags

pkgs.withDefaultHardeningFlags

Docs pulled from | This Revision | 3 days ago


Contribute
Enhance the ecosystem with your expertise! Contribute to fill the gaps in documentation. Your input can make a difference.

Noogle detected

Implementation

The following is the current implementation of this function.

defaultHardeningFlags: stdenv:
    let
      bintools =
        let
          bintools' = stdenv.cc.bintools;
        in
        if bintools' ? override then
          (bintools'.override {
            inherit defaultHardeningFlags;
          })
        else
          bintools';
    in
    stdenv.override (old: {
      cc =
        if stdenv.cc == null then
          null
        else
          stdenv.cc.override {
            inherit bintools;
          };
      allowedRequisites = lib.mapNullable (rs: rs ++ [ bintools ]) (stdenv.allowedRequisites or null);
    })