stdenvAdapters: add withDefaultHardeningFlags
This commit is contained in:
parent
1a5bd697ad
commit
dc2247a3b5
1 changed files with 14 additions and 0 deletions
|
@ -417,4 +417,18 @@ rec {
|
||||||
"propagatedBuildInputs"
|
"propagatedBuildInputs"
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
withDefaultHardeningFlags = 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);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue