Fix ghc-cabal build (#455)
authorAndrey Mokhov <andrey.mokhov@gmail.com>
Sat, 11 Nov 2017 14:47:51 +0000 (14:47 +0000)
committerGitHub <noreply@github.com>
Sat, 11 Nov 2017 14:47:51 +0000 (14:47 +0000)
See #395, #453

cabal.project
src/Settings/Packages/GhcCabal.hs
stack.yaml

index 1ef81ca..317094f 100644 (file)
@@ -1,2 +1,6 @@
-packages: ../libraries/Cabal/Cabal/
-          ./
+packages: ./
+          ../libraries/Cabal/Cabal/
+          ../libraries/filepath/
+          ../libraries/text/
+          ../libraries/hpc/
+          ../libraries/parsec/
index 7d2e99e..0e915b3 100644 (file)
@@ -11,14 +11,21 @@ ghcCabalPackageArgs = stage0 ? package ghcCabal ? builder Ghc ? do
     cabalDeps    <- expr $ stage1Dependencies cabal
     cabalVersion <- expr $ pkgVersion (unsafePkgCabalFile cabal) -- TODO: improve
     mconcat
-        [ pure [ "-package " ++ pkgName pkg | pkg <- cabalDeps, pkg /= parsec ]
+        [ pure [ "-package " ++ pkgName pkg | pkg <- cabalDeps \\ [parsec, mtl] ]
         , arg "--make"
         , arg "-j"
         , pure ["-Wall", "-fno-warn-unused-imports", "-fno-warn-warnings-deprecations"]
         , arg ("-DCABAL_VERSION=" ++ replace "." "," cabalVersion)
+        , arg "-DCABAL_PARSEC"
         , arg "-DBOOTSTRAPPING"
         , arg "-DMIN_VERSION_binary_0_8_0"
+        , arg "libraries/text/cbits/cbits.c"
         , arg "-ilibraries/Cabal/Cabal"
         , arg "-ilibraries/binary/src"
         , arg "-ilibraries/filepath"
-        , arg "-ilibraries/hpc" ]
+        , arg "-ilibraries/hpc"
+        , arg "-ilibraries/mtl"
+        , arg "-ilibraries/text"
+        , arg "-Ilibraries/text/include"
+        , arg "-ilibraries/parsec" ]
+
index da03763..a1b7413 100644 (file)
@@ -7,6 +7,10 @@ resolver: lts-9.0
 packages:
 - '.'
 - '../libraries/Cabal/Cabal'
+- '../libraries/filepath/'
+- '../libraries/text/'
+- '../libraries/hpc/'
+- '../libraries/parsec/'
 
 extra-deps:
 - shake-0.16