git.iko.soy/typeable/cabal2nix
on master help sign in
Merge pull request #259 from rvl/gi-pangocairo

Add post-processing for gi-pangocairo

commit05c4803e4dfee86346ead27011f1324054b59fb4 authorPeter Simons <simons@cryp.to> dateMon 6 Feb 2017, 11:45 (10 years ago) parent0d49e12ef3a3ad
1 file changed+16
src/Distribution/Nixpkgs/Haskell/FromCabal/PostProcess.hs+16
src/Distribution/Nixpkgs/Haskell/FromCabal/PostProcess.hs+16
@@ -63,6 +63,7 @@ hooks =
6363 , ("gi-gtk", giGtkPhaseOverrides) -- https://github.com/haskell-gi/haskell-gi/issues/36
6464 , ("gi-javascriptcore", giJavascriptCorePhaseOverrides) -- https://github.com/haskell-gi/haskell-gi/issues/36
6565 , ("gi-pango", giCairoPhaseOverrides) -- https://github.com/haskell-gi/haskell-gi/issues/36
66+ , ("gi-pangocairo", giPangoCairoPhaseOverrides) -- https://github.com/haskell-gi/haskell-gi/issues/36
6667 , ("gi-webkit2", giWebkit2PhaseOverrides) -- https://github.com/haskell-gi/haskell-gi/issues/36
6768 , ("gi-webkit2webextension", giWebkit2PhaseOverrides) -- https://github.com/haskell-gi/haskell-gi/issues/36
6869 , ("gio", set (libraryDepends . pkgconfig . contains "system-glib = pkgs.glib") True)
@@ -313,6 +314,21 @@ giCairoPhaseOverrides = over phaseOverrides (++'\n':txt)
313314 , "'';"
314315 ]
315316
317+giPangoCairoPhaseOverrides :: Derivation -> Derivation
318+giPangoCairoPhaseOverrides = set phaseOverrides txt
319+ . over (libraryDepends . pkgconfig) addPkgs
320+ where
321+ addPkgs = Set.union (Set.fromList [ "system-pango = pkgs.pango"
322+ , "system-cairo = pkgs.cairo" ])
323+ . Set.insert (pkg "gobjectIntrospection")
324+ gir = [ "system-pango.dev" ]
325+ txt = unlines [ "preConfigure = ''" ++ exportGirSearchPath gir ++ "'';"
326+ , "preCompileBuildDriver = ''"
327+ , " PKG_CONFIG_PATH+=\":${system-pango.dev}/lib/pkgconfig:${system-cairo.dev}/lib/pkgconfig\""
328+ , " setupCompileFlags+=\" $(pkg-config --libs pangocairo cairo-gobject)\""
329+ , "'';"
330+ ]
331+
316332giWebkit2PhaseOverrides :: Derivation -> Derivation
317333giWebkit2PhaseOverrides
318334 = set phaseOverrides ("preConfigure = ''" ++ exportGirSearchPath ["webkitgtk"] ++ "'';")