@@ -41,6 +41,9 @@ lib.makeOverridable (
43, enableSeparateDataOutput ? component.enableSeparateDataOutput
43, enableSeparateDataOutput ? component.enableSeparateDataOutput
46+, enableDebugRTS ? false
@@ -56,6 +59,7 @@ let
56 configFiles = makeConfigFiles {
59 configFiles = makeConfigFiles {
57 inherit (package) identifier;
60 inherit (package) identifier;
58 inherit component fullName flags;
61 inherit component fullName flags;
62+ needsProfiling = enableExecutableProfiling || enableLibraryProfiling;
61 enableFeature = enable: feature:
65 enableFeature = enable: feature:
@@ -114,6 +118,7 @@ let
114 ++ lib.optional (package.buildType == "Configure") "--configure-option=--host=${stdenv.hostPlatform.config}" )
118 ++ lib.optional (package.buildType == "Configure") "--configure-option=--host=${stdenv.hostPlatform.config}" )
115 ++ component.configureFlags
119 ++ component.configureFlags
116 ++ (ghc.extraConfigureFlags or [])
120 ++ (ghc.extraConfigureFlags or [])
121+ ++ lib.optional enableDebugRTS "--ghc-option=-debug"
119 setupGhcOptions = lib.optional (package.ghcOptions != null) '' --ghc-options="${package.ghcOptions}"'';
124 setupGhcOptions = lib.optional (package.ghcOptions != null) '' --ghc-options="${package.ghcOptions}"'';