commit 083d479b3f7e4a0ac0df238c92ba3b07f0513d7a
Author: Ollie Charles <ollie@ocharles.org.uk>
Date:   Thu Sep 19 09:44:38 2019 +0100

    Update Gtk2HsSetup.hs

diff --git a/src/Gtk2HsSetup.hs b/src/Gtk2HsSetup.hs
index 5b0f2a9e..78afcd14 100644
--- a/src/Gtk2HsSetup.hs
+++ b/src/Gtk2HsSetup.hs
@@ -88,7 +88,17 @@ versionNumbers = versionBranch
 
 onDefaultSearchPath f a b = f a b defaultProgramSearchPath
 #if MIN_VERSION_Cabal(2,5,0)
-libraryConfig lbi = case [clbi | (LBI.CLibName _, clbi, _) <- LBI.componentsConfigs lbi] of
+componentsConfigs :: LocalBuildInfo -> [(ComponentName, ComponentLocalBuildInfo, [ComponentName])]
+componentsConfigs lbi =
+    [ (componentLocalName clbi,
+       clbi,
+       mapMaybe (fmap componentLocalName . flip Graph.lookup g)
+                (componentInternalDeps clbi))
+    | clbi <- Graph.toList g ]
+  where
+    g = componentGraph lbi
+
+libraryConfig lbi = case [clbi | (LBI.CLibName _, clbi, _) <- componentsConfigs lbi] of
 #else
 libraryConfig lbi = case [clbi | (LBI.CLibName, clbi, _) <- LBI.componentsConfigs lbi] of
 #endif
