git.iko.soy/typeable/cabal2nix
on master help sign in
Add post-process hook that adds extra libraries to X11.
6e3550ePeter Simons
src/Cabal2Nix/PostProcess.hs+1−5
@@ -42,6 +42,7 @@ hooks = over (mapped._1) (\str -> fromMaybe (error ("invalid constraint: " ++ sh
42 , ("monad", set phaseOverrides xmonadPostInstall)
42 , ("monad", set phaseOverrides xmonadPostInstall)
43 , ("wxc", wxcHook)
43 , ("wxc", wxcHook)
44 , ("wxcore", set (libraryDepends . pkgconfig . contains "wxGTK") True)
44 , ("wxcore", set (libraryDepends . pkgconfig . contains "wxGTK") True)
45+ , ("X11", over (libraryDepends . system) (Set.union (Set.fromList ["libXinerama","libXext","libXrender"])))
45 ]
46 ]
46
47
47gitAnnexHook :: Derivation -> Derivation
48gitAnnexHook :: Derivation -> Derivation
@@ -185,14 +186,9 @@ postProcess' deriv@(MkDerivation {..})
185 | pname == "threadscope" = deriv { configureFlags = Set.insert "--ghc-options=-rtsopts" configureFlags }
186 | pname == "threadscope" = deriv { configureFlags = Set.insert "--ghc-options=-rtsopts" configureFlags }
186 | pname == "vacuum" = deriv { extraLibs = Set.insert "ghc-paths" extraLibs }
187 | pname == "vacuum" = deriv { extraLibs = Set.insert "ghc-paths" extraLibs }
187 | pname == "wxcore" = deriv { extraLibs = Set.fromList ["wxGTK","mesa","libX11"] `Set.union` extraLibs }
188 | pname == "wxcore" = deriv { extraLibs = Set.fromList ["wxGTK","mesa","libX11"] `Set.union` extraLibs }
188− | pname == "X11" && version >= Version [1,6] []
189− = deriv { extraLibs = Set.fromList ["libXinerama","libXext","libXrender"] `Set.union` extraLibs }
190− | pname == "X11" = deriv { extraLibs = Set.insert "libXinerama" (Set.insert "libXext" extraLibs) }
191 | pname == "X11-xft" = deriv { extraLibs = Set.fromList ["pkgconfig","freetype","fontconfig"] `Set.union` extraLibs
189 | pname == "X11-xft" = deriv { extraLibs = Set.fromList ["pkgconfig","freetype","fontconfig"] `Set.union` extraLibs
192 , configureFlags = Set.insert "--extra-include-dirs=${freetype}/include/freetype2" configureFlags
190 , configureFlags = Set.insert "--extra-include-dirs=${freetype}/include/freetype2" configureFlags
193 }
191 }
194− | pname == "xmonad" = deriv { phaseOverrides = xmonadPostInstall }
195−
196-- Unbreak packages during hackage2nix generation:
192-- Unbreak packages during hackage2nix generation:
197
193
198 | pname == "hnetcdf" = deriv { testDepends = Set.delete "netcdf" testDepends }
194 | pname == "hnetcdf" = deriv { testDepends = Set.delete "netcdf" testDepends }