anchor.diff:      find $out -type f -name '*.p_o' -delete
       find $out -type f -name '*.p_hi' -delete
       find $out -type f -name '*_p.a' -delete
  -    rm $out/lib/ghc-*/bin/ghc-iserv-prof
  +    # `-f` because e.g. musl bindist does not have this file.
  +    rm -f $out/lib/ghc-*/bin/ghc-iserv-prof
       # Hydra will redistribute this derivation, so we have to keep the docs for
       # legal reasons (retaining the legal notices etc)
       # As a last resort we could unpack the docs separately and symlink them in.
       # They're in $out/share/{doc,man}.
     '';
  +
  +  # In nixpkgs, musl based builds currently enable `pie` hardening by default
  +  # (see `defaultHardeningFlags` in `make-derivation.nix`).
  +  # But GHC cannot currently produce outputs that are ready for `-pie` linking.
  +  # Thus, disable `pie` hardening, otherwise `recompile with -fPIE` errors appear.
  +  # See:
  +  # * https://github.com/NixOS/nixpkgs/issues/129247
  +  # * https://gitlab.haskell.org/ghc/ghc/-/issues/19580
  +  hardeningDisable = lib.optional stdenv.targetPlatform.isMusl "pie";
   
     doInstallCheck = true;
     installCheckPhase = ''
  
positive.code:   src = fetchurl binDistUsed.src;
  
    nativeBuildInputs = [ perl ];
    propagatedBuildInputs = lib.optionals useLLVM [ llvmPackages.llvm ];
  
    # Set LD_LIBRARY_PATH or equivalent so that the programs running as part
    # of the bindist installer can find the libraries they expect.
  
negative.code: { lib, stdenv
  , fetchurl, perl, gcc
  , ncurses5
  , ncurses6, gmp, libiconv, numactl
  , llvmPackages
  
    # minimal = true; will remove files that aren't strictly necessary for
  