@@ -30,6 +30,10 @@
3030, # What flavour to build. An empty string indicates no
3131 # specific flavour and falls back to ghc default values.
3232 ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
33+, # Whether to backport https://phabricator.haskell.org/D4388 for
34+ # deterministic profiling symbol names, at the cost of a slightly
35+ # non-standard GHC API
36+ deterministicProfiling ? false
3337}:
3438
3539assert !enableIntegerSimple -> gmp != null;
@@ -94,7 +98,11 @@ stdenv.mkDerivation (rec {
9498 sha256 = "0plzsbfaq6vb1023lsarrjglwgr9chld4q3m99rcfzx0yx5mibp3";
9599 extraPrefix = "utils/hsc2hs/";
96100 stripLen = 1;
97− })]
101+ })] ++ stdenv.lib.optional deterministicProfiling
102+ (fetchpatch {
103+ url = "https://phabricator-files.haskell.org/file/data/yd2fclrwulila2quki5q/PHID-FILE-lr2j63hkglwauprxycrt/D4388.diff";
104+ sha256 = "0w6sdcvnqjlnlzpvnzw20b80v150ijjyjvs9548ildc1928j0w7s";
105+ })
98106 ++ stdenv.lib.optional stdenv.isDarwin ./backport-dylib-command-size-limit.patch;
99107
100108 postPatch = "patchShebangs .";