[commit: ghc] wip/nfs-locking: Use in-tree cabal in build.cabal.sh (works for cabal < 1.24) (fc4c968)

git at git.haskell.org git at git.haskell.org
Fri Oct 27 00:20:09 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/nfs-locking
Link       : http://ghc.haskell.org/trac/ghc/changeset/fc4c968378c1d4467cf59e8bbaefa66f473526f7/ghc

>---------------------------------------------------------------

commit fc4c968378c1d4467cf59e8bbaefa66f473526f7
Author: Kai Harries <kai.harries at gmail.com>
Date:   Sun Jul 24 11:37:08 2016 +0200

    Use in-tree cabal in build.cabal.sh (works for cabal < 1.24)
    
    Partial fix of #274
    
    This installs the in-tree Cabal into the cabal-sandbox before building
    hadrian itself. This only works if the installed cabal version is < 1.24,
    because I have not yet figured out how it can be done with the newly
    introduced `new-build` command.


>---------------------------------------------------------------

fc4c968378c1d4467cf59e8bbaefa66f473526f7
 build.cabal.sh | 5 +++++
 hadrian.cabal  | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/build.cabal.sh b/build.cabal.sh
index 4a24dac..be2a117 100755
--- a/build.cabal.sh
+++ b/build.cabal.sh
@@ -61,6 +61,11 @@ else
     # Initialize sandbox if necessary
     if ! ( "$CABAL" sandbox hc-pkg list > /dev/null 2>&1); then
         "$CABAL" sandbox init
+        ( cd ../libraries/Cabal/Cabal
+          ln -s "$absoluteRoot/cabal.sandbox.config" cabal.sandbox.config
+          cabal install
+          rm cabal.sandbox.config
+        )
         "$CABAL" install                \
             --dependencies-only         \
             --disable-library-profiling \
diff --git a/hadrian.cabal b/hadrian.cabal
index 63bd164..c07cef1 100644
--- a/hadrian.cabal
+++ b/hadrian.cabal
@@ -120,7 +120,7 @@ executable hadrian
                        , ScopedTypeVariables
     build-depends:       base >= 4.8 && < 5
                        , ansi-terminal        == 0.6.*
-                       , Cabal                == 1.22.* || == 1.24.* || == 1.25.*
+                       , Cabal                >= 1.25
                        , containers           == 0.5.*
                        , directory            == 1.2.*
                        , extra                >= 1.4.7



More information about the ghc-commits mailing list