Cabal fix.
This commit is contained in:
parent
1acd230b94
commit
c8da903578
16
Setup.hs
16
Setup.hs
@ -1,2 +1,16 @@
|
|||||||
import Distribution.Simple
|
import Distribution.Simple
|
||||||
main = defaultMainWithHooks defaultUserHooks
|
import Distribution.Setup ( ConfigFlags (..) )
|
||||||
|
import System.Directory ( findExecutable )
|
||||||
|
|
||||||
|
main = defaultMainWithHooks (defaultUserHooks { postConf = defaultPostConf })
|
||||||
|
where defaultPostConf args flags lbi
|
||||||
|
= do args' <- fmap (args++) (configToArgs flags)
|
||||||
|
(postConf defaultUserHooks) args' flags lbi
|
||||||
|
|
||||||
|
configToArgs :: ConfigFlags -> IO [String]
|
||||||
|
configToArgs (ConfigFlags { configHcPath = Just hcPath })
|
||||||
|
= do exec <- findExecutable hcPath
|
||||||
|
case exec of
|
||||||
|
Just realPath -> return ["--with-ghc="++realPath]
|
||||||
|
Nothing -> return ["--with-ghc="++hcPath]
|
||||||
|
configToArgs _ = return []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user