Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Cabal
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Glasgow Haskell Compiler
Packages
Cabal
Commits
4bb19ed2
Commit
4bb19ed2
authored
8 years ago
by
Edward Z. Yang
Browse files
Options
Downloads
Patches
Plain Diff
Document environment variables that can be used to change Paths values.
Signed-off-by:
Edward Z. Yang
<
ezyang@cs.stanford.edu
>
parent
5551eb3d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Cabal/Distribution/Simple/Build/PathsModule.hs
+3
-0
3 additions, 0 deletions
Cabal/Distribution/Simple/Build/PathsModule.hs
Cabal/doc/developing-packages.markdown
+9
-0
9 additions, 0 deletions
Cabal/doc/developing-packages.markdown
with
12 additions
and
0 deletions
Cabal/Distribution/Simple/Build/PathsModule.hs
+
3
−
0
View file @
4bb19ed2
...
...
@@ -242,6 +242,9 @@ generate pkg_descr lbi clbi =
-- | Generates the name of the environment variable controlling the path
-- component of interest.
--
-- Note: The format of these strings is part of Cabal's public API;
-- changing this function constitutes a *backwards-compatibility* break.
pkgPathEnvVar
::
PackageDescription
->
String
-- ^ path component; one of \"bindir\", \"libdir\",
-- \"datadir\", \"libexecdir\", or \"sysconfdir\"
...
...
This diff is collapsed.
Click to expand it.
Cabal/doc/developing-packages.markdown
+
9
−
0
View file @
4bb19ed2
...
...
@@ -2071,6 +2071,15 @@ getLibexecDir :: IO FilePath
getSysconfDir :: IO FilePath
~~~~~~~~~~~~~~~
The actual location of all these directories can be individually
overridden at runtime using environment variables of the form
`pkg_name_var`
, where
`pkg_name`
is the name of the package with
all hyphens converted into underscores, and
`var`
is either
`bindir`
,
`libdir`
,
`datadir`
,
`libexedir`
or
`sysconfdir`
.
For example, the configured data directory for
`pretty-show`
is controlled with the
`pretty_show_datadir`
environment variable.
### Accessing the package version ###
The aforementioned auto generated
`Paths_`
_pkgname_
module also
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment