@@ -26,6 +26,10 @@
2626 !(targetPlatform.isDarwin
2727 # On iOS, dynamic linking is not supported
2828 && (targetPlatform.isAarch64 || targetPlatform.isArm))
29+, # Whether to backport https://phabricator.haskell.org/D4388 for
30+ # deterministic profiling symbol names, at the cost of a slightly
31+ # non-standard GHC API
32+ deterministicProfiling ? false
2933}:
3034
3135assert !enableIntegerSimple -> gmp != null;
@@ -85,11 +89,11 @@ stdenv.mkDerivation rec {
8589 url = "https://git.haskell.org/ghc.git/commitdiff_plain/2fc8ce5f0c8c81771c26266ac0b150ca9b75c5f3";
8690 sha256 = "03253ci40np1v6k0wmi4aypj3nmj3rdyvb1k6rwqipb30nfc719f";
8791 })
92+ ] ++ stdenv.lib.optional deterministicProfiling
8893 (fetchpatch { # Backport of https://phabricator.haskell.org/D4388 for more determinism
8994 url = "https://github.com/shlevy/ghc/commit/fec1b8d3555c447c0d8da0e96b659be67c8bb4bc.patch";
9095 sha256 = "1lyysz6hfd1njcigpm8xppbnkadqfs0kvrp7s8vqgb38pjswj5hg";
91− })
92− ];
96+ });
9397
9498 postPatch = "patchShebangs .";
9599