ghcitui/INSTALL.rst

100 lines
2.0 KiB
ReStructuredText
Raw Normal View History

2023-10-13 10:14:00 +03:00
======================
BUILD AND INSTALLATION
======================
This document describes how to build, install, and test the GHCiTUI program.
-----------------
Table of contents
-----------------
#. Working with the source
#. Getting the source
#. Building
#. Testing
2023-10-15 08:05:11 +03:00
#. Installing
2023-10-13 10:14:00 +03:00
======================
2023-10-15 08:05:11 +03:00
Working with the source
2023-10-13 10:14:00 +03:00
======================
GHCiTUI is configured, built, and installed through ``cabal``:
https://www.haskell.org/cabal/. Cabal can be installed through the ``ghcup``
command line tool. Familiarity with Cabal is not necessary to build GHCiTUI.
------------------
Getting the source
------------------
Currently the source code is hosted on https://github.com. You can check out
the source code using ``git`` with SSH:
.. code:: shell
# SSH (for contributors, requires SSH set up)
git clone git@github.com:CrystalSplitter/ghcitui.git
Or HTTPS:
.. code:: shell
# HTTPS
git clone https://github.com/CrystalSplitter/ghcitui.git
--------
Building
--------
We should set up the Cabal project file with some configuration options before
2023-10-15 08:05:11 +03:00
we build.
2023-10-13 10:14:00 +03:00
.. code:: shell
2023-10-15 08:05:11 +03:00
# User install (installs to $HOME/.cabal)
cabal configure -O --installdir="$HOME/.cabal" -j
# Global install (will require administrator privileges to actually install)
cabal configure -O -j
2023-10-13 10:14:00 +03:00
2023-10-15 08:05:11 +03:00
For contributors, you'll want to enable some useful testing flags, so run this
after the above:
2023-10-13 10:14:00 +03:00
.. code:: shell
2023-10-15 08:05:11 +03:00
cabal configure \
-O \
2023-10-13 10:14:00 +03:00
--test-option='--color' \
--test-show-details=streaming
2023-10-15 08:05:11 +03:00
Now we can build the GHCiTUI executable
.. code:: shell
cabal build
-------
Testing
-------
Unit tests are run automatically during installation, but you can also run them
manually with:
2023-10-16 04:07:20 +03:00
.. code:: shell
2023-10-15 08:05:11 +03:00
cabal test
----------
Installing
----------
To install:
.. code:: shell
# Per-user install (recommended)
cabal install
# Install globally (note this may require root privileges)
cabal install --install-method=copy --installdir=/usr/local/bin