When installing inside a cabal sandbox, cabal will still use packages from the global package db (in particular, packages which came from the Haskell Platform). This can lead to install conflicts. Is it possible to configure cabal to ignore the global package db?
I see the corresponding feature has been implemented in ghc
itself, via a -no-global-package-db
option (see https://ghc.haskell.org/trac/ghc/ticket/5977), and ghc-pkg
will ignore the global package db if you do not pass it the --global
flag. Is there a way to configure cabal similarly?
Also, there's a closed issue against cabal implying the opposite behavior (rebuilding everything instead of using packages from the installed Haskell Platform), so I'm not sure if this behavior has changed over time; see https://github.com/haskell/cabal/issues/1695