git.iko.soy/typeable/cabal2nix
on master help sign in
Add post-processing for gi-pangocairo
commitef3a3ad257b93a722e27b37936f3ec8a03e2efb5 authorRodney Lorrimar <dev@rodney.id.au> dateSun 5 Feb 2017, 23:13 (10 years ago) parent0d49e12
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"] ++ "'';")