@@ -44,7 +44,7 @@ hooks = over (mapped._1) (\str -> fromMaybe (error ("invalid constraint: " ++ sh
4444 , ("gf", set phaseOverrides gfPhaseOverrides . set doCheck False)
4545 , ("github-backup", set (executableDepends . tool . contains (pkg "git")) True)
4646 , ("GlomeVec", set (libraryDepends . pkgconfig . contains (bind "self.llvmPackages.llvm")) True)
47− , ("gtk3", set (libraryDepends . pkgconfig . contains (pkg "gtk3")) True) -- https://github.com/NixOS/cabal2nix/issues/145
47+ , ("gtk3", gtk3Hook)
4848 , ("imagemagick", set (libraryDepends . pkgconfig . contains (pkg "imagemagick")) True) -- https://github.com/NixOS/cabal2nix/issues/136
4949 , ("jsaddle", set (dependencies . haskell . contains (pkg "ghcjs-base")) False)
5050 , ("mysql", set (libraryDepends . system . contains (pkg "mysql")) True)
@@ -70,6 +70,11 @@ bind s = create binding (i, create path is)
7070 is = map (create ident) (splitOn "." s)
7171 i = last is
7272
73+-- TODO: I need to figure out how to conveniently replace a binding in a set.
74+gtk3Hook :: Derivation -> Derivation -- https://github.com/NixOS/cabal2nix/issues/145
75+gtk3Hook = set (libraryDepends . pkgconfig . contains (pkg "gtk3")) True
76+ . over (libraryDepends . pkgconfig) (Set.filter (\b -> view localName b /= "gtk3"))
77+
7378gitAnnexHook :: Derivation -> Derivation
7479gitAnnexHook = set phaseOverrides gitAnnexOverrides . over (executableDepends . system) (Set.union buildInputs)
7580 where