ghcitui/INSTALL.rst

106 lines
2.7 KiB
ReStructuredText
Raw Permalink Normal View History

**********************
2023-10-13 10:14:00 +03:00
BUILD AND INSTALLATION
**********************
2023-10-13 10:14:00 +03:00
This document describes how to build, install, and test the GHCiTUI program.
2024-01-17 10:31:35 +03:00
At present, installation has only been tested on Linux systems. While
installation may work on other operating systems, you may encounter issues.
2023-10-16 04:31:13 +03:00
GHCiTUI is configured, built, and installed through `Cabal`_. Cabal can be
installed through the ``ghcup`` command line tool. Familiarity with Cabal
is not necessary to build GHCiTUI.
2023-10-13 10:14:00 +03:00
Installing Latest Stable From Hackage
=====================================
The simplest way to install GHCiTUI is by downloading the package from Hackage:
.. code-block:: shell
cabal update && cabal install ghcitui
# And to check it was successfully installed...
ghcitui --version
# ghcitui <VERSION>
If this fails, see `Troubleshooting`_ below for possible
fixes.
2023-10-13 10:14:00 +03:00
Getting the source
==================
2023-10-13 10:14:00 +03:00
2024-01-17 10:31:35 +03:00
Currently the source code is hosted at
https://github.com/CrystalSplitter/ghcitui. You can check out the source code
using ``git``.
Note however that the repository is configured with ``git lfs``
to store documentation images, so if you want images in your checkout, you
must `install git-lfs separately`_.
Checking out with SSH:
2023-10-13 10:14:00 +03:00
2023-12-10 05:11:02 +03:00
.. code-block:: shell
2023-10-13 10:14:00 +03:00
# SSH (for contributors, requires SSH set up)
git clone git@github.com:CrystalSplitter/ghcitui.git
Or HTTPS:
2023-12-10 05:11:02 +03:00
.. code-block:: shell
2023-10-13 10:14:00 +03:00
# HTTPS
git clone https://github.com/CrystalSplitter/ghcitui.git
Building
========
2023-10-13 10:14:00 +03:00
2023-10-16 04:31:13 +03:00
The GHCiTUI cabal configurations defaults to release builds in the
`cabal.project`_. Therefore, we can just run...
2023-10-15 08:05:11 +03:00
2023-12-10 05:11:02 +03:00
.. code-block:: shell
2023-10-15 08:05:11 +03:00
cd ghcitui
cabal build all # Build library and executable (release mode)
cabal test all # Run tests (optional)
cabal install exe:ghcitui # Per-user install (Nix-Style)
2023-10-16 04:31:13 +03:00
By default, this will place the ``ghcitui`` executable in
``$HOME/.cabal/bin``.
2023-10-28 11:09:16 +03:00
Contributors may find it useful to make their own
``cabal.project.local`` with ``cabal configure`` while debugging.
Troubleshooting
===============
Here we list some known build or install issues.
Cannot find -ltinfo
-------------------
If you see this error (or similar) when installing ``ghcitui``:
.. code-block::
-->8--
/usr/bin/ld.gold: error: cannot find -ltinfo
collect2: error: ld returned 1 exit status
`gcc' failed in phase `Linker'. (Exit code: 1)
Error: cabal: Failed to build vty-unix-0.2.0.0
-->8--
This usually means there's a missing linking dependency on libtinfo which can
be satisfied by an ncurses development package. On Debian-based systems, this
can be installed with:
.. code-block:: shell
sudo apt install libncurses-dev
2023-10-16 04:31:13 +03:00
.. _Cabal: https://www.haskell.org/cabal/
.. _cabal.project: ./cabal.project
.. _install git-lfs separately: https://git-lfs.com/