Commit f248f525 authored by md9ms's avatar md9ms
Browse files

Make the ghc build look at ~/.ghc-packages

parent 0432902e
...@@ -60,6 +60,7 @@ import Distribution.Simple.Utils (rawSystemExit, setupMessage, ...@@ -60,6 +60,7 @@ import Distribution.Simple.Utils (rawSystemExit, setupMessage,
import Control.Monad (when) import Control.Monad (when)
import Data.List(intersperse, nub) import Data.List(intersperse, nub)
import System.Environment (getEnv)
#ifdef DEBUG #ifdef DEBUG
import HUnit (Test) import HUnit (Test)
...@@ -94,7 +95,9 @@ buildGHC :: FilePath -> PackageDescription -> LocalBuildInfo -> IO () ...@@ -94,7 +95,9 @@ buildGHC :: FilePath -> PackageDescription -> LocalBuildInfo -> IO ()
buildGHC pref pkg_descr lbi = do buildGHC pref pkg_descr lbi = do
-- first, build the modules -- first, build the modules
let args = constructGHCCmdLine pref pkg_descr lbi home <- getEnv "HOME"
let args = ["-package-conf", home ++ "/.ghc-packages"]
++ constructGHCCmdLine pref pkg_descr lbi
rawSystemExit (compilerPath (compiler lbi)) args rawSystemExit (compilerPath (compiler lbi)) args
-- build any C sources -- build any C sources
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment