Skip to content
Snippets Groups Projects
Unverified Commit dcbe65e2 authored by Mikolaj Konarski's avatar Mikolaj Konarski Committed by GitHub
Browse files

Merge pull request #7526 from Mikolaj/master

Rewrite 'Building the package' docs chapter to use v2- commands, not v1-
parents 2bd05888 8363212f
No related branches found
No related tags found
No related merge requests found
......@@ -43,7 +43,7 @@ apply options to an external package, use a ``package`` stanza in a
``cabal.project`` file.
There are two ways of modifying the ``cabal.project.local`` file through
``cabal v2-configure``, either by appending new configurations to it, or
``cabal v2-configure``, either by appending new configurations to it, or
by simply overwriting it all. Overwriting is the default behaviour, as
such, there's a flag ``--enable-append`` to append the new configurations
instead. Since overwriting is rather destructive in nature, a backup system
......@@ -325,6 +325,8 @@ by using ``--install-method`` flag:
Note that copied executables are not self-contained, since they might use
data-files from the store.
.. _adding-libraries:
Adding libraries to GHC package environments
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
......
......@@ -216,23 +216,23 @@ information see the :ref:`common-stanzas` section.
Building the package
--------------------
For simple packages that's it! We can now try configuring and building
the package:
For simple packages that's it! We can now try building the package,
which also downloads and builds all required dependencies:
.. code-block:: console
$ cabal configure
$ cabal build
Assuming those two steps worked then you can also install the package:
If the package contains an executable, it can be installed:
.. code-block:: console
$ cabal install
For libraries this makes them available for use in GHCi or to be used by
other packages. For executables it installs the program so that you can
run it (though you may first need to adjust your system's ``$PATH``).
The executable program lands in a special directory for binaries
that may or may not already be on your system's ``$PATH``.
If it is, the executable can be run by typing its filename on commandline.
For installing libraries see the :ref:`adding-libraries` section.
Next steps
----------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment