Skip to content

Commit 271f5c3

Browse files
committed
gi-*: help the build find required gir files
1 parent 00c65e5 commit 271f5c3

File tree

1 file changed

+10
-0
lines changed
  • distribution-nixpkgs/src/Distribution/Nixpkgs/Haskell/FromCabal

1 file changed

+10
-0
lines changed

distribution-nixpkgs/src/Distribution/Nixpkgs/Haskell/FromCabal/PostProcess.hs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ hooks =
4949
, ("eventstore", over (metaSection . platforms) (Set.filter (\(Platform arch _) -> arch == X86_64)))
5050
, ("freenect < 1.2.1", over configureFlags (Set.union (Set.fromList ["--extra-include-dirs=${pkgs.freenect}/include/libfreenect", "--extra-lib-dirs=${pkgs.freenect}/lib"])))
5151
, ("gf", set phaseOverrides gfPhaseOverrides . set doCheck False)
52+
, ("gi-cairo", giPhaseOverrides) -- https://github.com/haskell-gi/haskell-gi/issues/36
53+
, ("gi-gio", giPhaseOverrides) -- https://github.com/haskell-gi/haskell-gi/issues/36
54+
, ("gi-glib", giPhaseOverrides) -- https://github.com/haskell-gi/haskell-gi/issues/36
55+
, ("gi-gobject", giPhaseOverrides) -- https://github.com/haskell-gi/haskell-gi/issues/36
56+
, ("gi-pango", giPhaseOverrides) -- https://github.com/haskell-gi/haskell-gi/issues/36
5257
, ("gio", set (libraryDepends . pkgconfig . contains "system-glib = pkgs.glib") True)
5358
, ("git-annex", gitAnnexHook)
5459
, ("github-backup", set (executableDepends . tool . contains (pkg "git")) True)
@@ -238,6 +243,11 @@ stackOverrides = unlines
238243
, "'';"
239244
]
240245

246+
giPhaseOverrides :: Derivation -> Derivation
247+
giPhaseOverrides
248+
= set phaseOverrides "preConfigure = \"export HASKELL_GI_GIR_SEARCH_PATH=${gobjectIntrospection.dev}/share/gir-1.0\";"
249+
. set (libraryDepends . pkgconfig . contains (pkg "gobjectIntrospection")) True
250+
241251
{-
242252
postProcess' :: Derivation -> Derivation
243253
postProcess' deriv@(MkDerivation {..})

0 commit comments

Comments
 (0)