anchor.diff:    configurePlatforms = [];
     inherit configureFlags;
   
  +  # Note: the options here must be always added, regardless of whether the
  +  # package specifies `hardeningDisable`.
  +  hardeningDisable = lib.optionals (args ? hardeningDisable) hardeningDisable
  +    ++ lib.optional (ghc.isHaLVM or false) "all"
  +    # Static libraries (ie. all of pkgsStatic.haskellPackages) fail to build
  +    # because by default Nix adds `-pie` to the linker flags: this
  +    # conflicts with the `-r` and `-no-pie` flags added by GHC (see
  +    # https://gitlab.haskell.org/ghc/ghc/-/issues/19580). hardeningDisable
  +    # changes the default Nix behavior regarding adding "hardening" flags.
  +    ++ lib.optional enableStaticLibraries "pie";
  +
     configurePhase = ''
       runHook preConfigure
   
  
positive.code: // optionalAttrs (args ? preFixup)               { inherit preFixup; }
  // optionalAttrs (args ? postFixup)              { inherit postFixup; }
  // optionalAttrs (args ? dontStrip)              { inherit dontStrip; }
  // optionalAttrs (args ? hardeningDisable)       { inherit hardeningDisable; }
  // optionalAttrs (stdenv.buildPlatform.libc == "glibc"){ LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive"; }
  )
  )
  
negative.code: , shellHook ? ""
  , coreSetup ? false # Use only core packages to build Setup.hs.
  , useCpphs ? false
  , hardeningDisable ? null
  , enableSeparateBinOutput ? false
  , enableSeparateDataOutput ? false
  , enableSeparateDocOutput ? doHaddock
  