diff options
| author | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2026-04-25 14:02:27 -0400 |
|---|---|---|
| committer | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2026-04-25 14:02:27 -0400 |
| commit | 6d8bdc65446a704d0750217efd05532fc641ea7d (patch) | |
| tree | 8ae6d698b3c9801750a8b117b3842fb369872a3a /static/openbsd/man5/cabal-module.5 | |
| parent | 2f467bd7ff8f8db0dafa40426166491d7f57f368 (diff) | |
docs: OpenBSD Man Pages Added
Diffstat (limited to 'static/openbsd/man5/cabal-module.5')
| -rw-r--r-- | static/openbsd/man5/cabal-module.5 | 140 |
1 files changed, 140 insertions, 0 deletions
diff --git a/static/openbsd/man5/cabal-module.5 b/static/openbsd/man5/cabal-module.5 new file mode 100644 index 00000000..c032d847 --- /dev/null +++ b/static/openbsd/man5/cabal-module.5 @@ -0,0 +1,140 @@ +.\" $OpenBSD: cabal-module.5,v 1.3 2025/08/16 16:43:06 daniel Exp $ +.\" +.\" Copyright (c) 2021 Greg Steuck +.\" +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.Dd $Mdocdate: August 16 2025 $ +.Dt CABAL-MODULE 5 +.Os +.Sh NAME +.Nm cabal-module +.Nd devel/cabal port module for building Haskell programs +.Sh DESCRIPTION +This manual page documents the behavior of setting +.Li MODULES=devel/cabal +in the +.Xr ports 7 +tree. +.Pp +Uses +.Xr cabal 1 +to automate packaging Haskell binary projects. +During +.Cm fetch , +the dependent packages enumerated in +.Ev MODCABAL_MANIFEST +are downloaded into the +.Pa hackage +subdirectory of +.Ev DIST_SUBDIR . +During +.Cm post-extract , +the dependency sources are unpacked into +.Ev WORKDIR . +Special care is taken to replace .cabal files if they are updated +post-release on hackage. +A custom +.Pa cabal.project.local +file gets created to direct +.Xr cabal 1 +to the extracted packages and prevent any network interaction. +In rare cases a custom +.Pa cabal.project +is required. +This module automatically copies such files from port's +.Pa files +into +.Ev WRKSRC . +During +.Cm build , +.Xr cabal 1 +is invoked to build the executables listed in +.Ev MODCABAL_EXECUTABLES . +.Pp +.Pa lang/ghc +and +.Pa devel/cabal-install +are added to +.Ev BUILD_DEPENDS . +This module uses +.Ev SITES.hs +to download the sources from hackage. +.Pp +This module parameters: +.Bl -tag -width MODCABAL_EXECUTABLES +.It MODCABAL_STEM +Name of the package on hackage (required). +.It MODCABAL_VERSION +Version of the package (required). +.It MODCABAL_MANIFEST +Hackage dependencies required by this package, see below. +.It MODCABAL_DATA_DIR +data-dir from .cabal file (if executable needs this) +.It MODCABAL_REVISION +Numeric revision of .cabal file on hackage if one is +needed on top of .cabal file contained in the .tar.gz file. +.It MODCABAL_BUILD_ARGS +passed to cabal v2-build +.It MODCABAL_FLAGS +custom feature +.Fl -flags +for +.Xr cabal 1 . +.It MODCABAL_EXECUTABLES +Executable target in .cabal file, defaults to hackage package name in +.Ev MODCABAL_STEM . +.El +.Pp +This module adds currently adds no +.Xr make 1 +targets. +.Sh DEPENDENCY MANIFEST +Hackage dependencies are listed in +.Ev MODCABAL_MANIFEST +as space separate triples of +.Em package +.Em version +.Em revision . +They correspond to the main package values of +.Ev MODCABAL_STEM +.Ev MODCABAL_VERSION +.Ev MODCABAL_REVISION . +.Pp +The contents of +.Ev MODCABAL_MANIFEST +is normally generated by +.Pa devel/cabal-bundler +which creates a working build plan from hackage dependency information. +.Sh EXAMPLES +To create a new Haskell binary port one would install cabal-bundler +port, look up the chosen package version number on hackage. +E.g. +.Pp +$ +.Cm cabal-bundler +.Fl -openbsd +.Ar cpphs-1.20 +.Sh SEE ALSO +.Xr cabal 1 , +.Xr port-modules 5 |
