haskell: add support for 'hardeningDisable' to the generic builder
We also have a new helper function 'disableHardening' to use in overrides. Fixes https://github.com/NixOS/nixpkgs/issues/14820.
This commit is contained in:
parent
aa1d424421
commit
97fd905823
@ -47,6 +47,7 @@
|
||||
, shellHook ? ""
|
||||
, coreSetup ? false # Use only core packages to build Setup.hs.
|
||||
, useCpphs ? false
|
||||
, hardeningDisable ? []
|
||||
} @ args:
|
||||
|
||||
assert editedCabalFile != null -> revision != null;
|
||||
@ -329,5 +330,6 @@ stdenv.mkDerivation ({
|
||||
// optionalAttrs (preFixup != "") { inherit preFixup; }
|
||||
// optionalAttrs (postFixup != "") { inherit postFixup; }
|
||||
// optionalAttrs (dontStrip) { inherit dontStrip; }
|
||||
// optionalAttrs (hardeningDisable != []) { inherit hardeningDisable; }
|
||||
// optionalAttrs (stdenv.isLinux) { LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive"; }
|
||||
)
|
||||
|
@ -62,6 +62,8 @@ rec {
|
||||
doHyperlinkSource = drv: overrideCabal drv (drv: { hyperlinkSource = true; });
|
||||
dontHyperlinkSource = drv: overrideCabal drv (drv: { hyperlinkSource = false; });
|
||||
|
||||
disableHardening = drv: flags: overrideCabal drv (drv: { hardeningDisable = flags; });
|
||||
|
||||
sdistTarball = pkg: pkgs.lib.overrideDerivation pkg (drv: {
|
||||
name = "${drv.pname}-source-${drv.version}";
|
||||
buildPhase = "./Setup sdist";
|
||||
|
Loading…
Reference in New Issue
Block a user