The stackage-sandbox package

[ Tags: deprecated, development, library, mit, program ] [ Propose Tags ]
Deprecated. in favor of stack

Work with shared stackage sandboxes

[Skip to Readme]


Versions 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6
Change log
Dependencies attoparsec, base (>=4.7 && <5), bytestring, conduit-combinators (>=0.4), conduit-extra, directory, filepath, optparse-applicative, process, stackage-cli, text [details]
License MIT
Copyright 2015 FP Complete Corporation
Author Dan Burton
Category Development
Home page
Bug tracker
Source repository head: git clone git://
Uploaded Tue Sep 1 15:43:08 UTC 2015 by DanBurton
Distributions NixOS:0.1.6
Executables stackage-sandbox
Downloads 1092 total (8 in the last 30 days)
Rating 0.0 (0 ratings) [clear rating]
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2015-09-01 [all 1 reports]
Hackage Matrix CI




Maintainer's Corner

For package maintainers and hackage trustees

Readme for stackage-sandbox-0.1.6

[back to package description]


Build Status

A command-line interface for leveraging stackage.

You must have ghc, ghc-pkg, and cabal on your $PATH. This program will make various calls to those executables on your behalf.

This package provides a number of executables. Primary among these is the stackage executable (and its alias stk). The stackage command-line program will inspect your path for stackage plugins, and will dispatch to them. Anything on your $PATH prefixed stackage- that responds to the --summary flag is considered a stackage plugin.

(This package also provides a library, Stackage.CLI, which is intended to make the process of writing stackage plugins easier.)

This package provides the following stackage plugins:

stackage init

Downloads a cabal.config file from That's all it does! The cabal.config file constrains the package versions used to build your project. is constantly calculating the best compatible build plans for a big subset of Hackage.

stackage purge

Calls ghc-pkg unregister on your package databases. (You will be prompted on a per-db basis; use stackage purge --force if you don't want to be prompted.) This is an easy way to clean out your sandbox.

stackage upgrade

A stackage purge followed by stackage init.

stackage sandbox

The sandbox plugin has a few commands of its own that mirror the above three stackage commands:

stackage sandbox init

In addition to downloading a cabal.config file, this will also set up a shared sandbox (via cabal.sandbox.config) corresponding to whatever stackage snapshot is used. By default, the latest available Stackage LTS snapshot will be used.

Shared sandboxes are located at $HOME/.stackage/sandboxes. Be aware! Anything you cabal install to this sandbox will be available to any other projects that share the same sandbox. The cabal.config file should help make sure you don't install anything incompatible.

stackage sandbox delete

Delete cabal.config and cabal.sandbox.config.

Unlike stackage purge, this does not alter any package databases. The shared sandbox will remain untouched. You can use stackage sandbox delete NAME to delete the shared sandbox called NAME (e.g. lts-2.0) from your system.

stackage sandbox upgrade

Replace cabal.config and cabal.sandbox.config with newer versions and (possibly) a new shared sandbox.

Further reading

See also: this example on the stackage-cli wiki.