MyNixOS website logo
Description

Work with shared stackage sandboxes.

stackage-cli

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 stackage.org. That's all it does! The cabal.config file constrains the package versions used to build your project. Stackage.org 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.

Metadata

Version

0.1.6

License

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows