-
Notifications
You must be signed in to change notification settings - Fork 31
/
hsenv.cabal
179 lines (153 loc) · 7.57 KB
/
hsenv.cabal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
Name: hsenv
Version: 0.4
Synopsis: Virtual Haskell Environment builder
Description: hsenv is a tool (inspired by Python's virtualenv) to create isolated Haskell environments.
.
It creates a sandboxed environment in a .hsenv/ sub-directory
of your project, which, when activated, allows you to use regular Haskell tools
(ghc, ghci, ghc-pkg, cabal) to manage your Haskell code and environment.
It's possible to create an environment, that uses different GHC version
than your currently installed. Very simple emacs integration mode is included.
.
Basic usage
.
First, choose a directory where you want to keep your
sandboxed Haskell environment, usually a good choice is a directory containing
your cabalized project (if you want to work on a few projects
(perhaps an app and its dependent library), just choose any of them,
it doesn't really matter). Enter that directory:
.
> cd ~/projects/foo
.
Next, create your new isolated Haskell environment
(this is a one time only (per environment) step):
.
> hsenv
.
Now, every time you want to use this environment, you have to activate it:
.
> source .hsenv/bin/activate
.
That's it! Now it's possible to use all regular Haskell tools like usual,
but it won't affect your global/system's Haskell environment, and also
your per-user environment (from ~/.cabal and ~/.ghc) will stay the same.
All cabal-installed packages will be private to this environment,
and also the external environments (global and user) will not affect it
(this environment will only inherit very basic packages,
mostly ghc and Cabal and their deps).
.
When you're done working with this environment, enter command 'deactivate_hsenv',
or just close the current shell (with exit).
.
> deactivate_hsenv
.
Named vs Unnamed Environments
.
By default, hsenv creates an "unnamed" environment, but sometimes for
particular use cases you might want to create different environments under
the same directory. This is achievable creating a "named" environment. To
do that, just pass the flag "--name=<ENVIRONMENT_NAME>" to hsenv:
.
hsenv --name=<ENVIRONMENT_NAME>
.
This will make hsenv to generate a folder of the form ".hsenv_<ENVIRONMENT_NAME>".
.
Advanced usage.
.
The only advanced usage is using different GHC version. This can be useful to test your code
against different GHC version (even against nightly builds).
.
First, download binary distribution of GHC for your platform
(e.g. ghc-7.0.4-i386-unknown-linux.tar.bz2), then create a new environment using that GHC
.
> hsenv --ghc=/path/to/ghc_something.tar.bz2
.
Then, proceed (with [de]activation) as in basic case.
.
Fetching and downloading a remote version of GHC
.
Recent versions of hsenv include the possibility to automatically download
and install a GHC version directly from the GHC main repository. To do that,
as regards the example above, all you need to do is to pass the desired version
of GHC you want to install:
.
> hsenv --ghc=7.4.1
.
Or a valid URL pointing to a compressed GHC archive:
.
> hsenv --ghc=http://www.haskell.org/ghc/dist/7.6.3/ghc-7.6.3-x86_64-apple-darwin.tar.bz2
.
Misc
.
hsenv has been tested on i386 Linux and FreeBSD systems,
but it should work on any Posix platform. External (from tarball) GHC feature
requires binary GHC distribution compiled for your platform,
that can be extracted with tar and installed with
"./configure --prefix=PATH; make install".
.
For more info please consult "hsenv --help" or the attached README file.
Homepage: https://github.com/tmhedberg/hsenv
License: BSD3
License-file: LICENSE
Author: Bartosz Ćwikłowski
Maintainer: Taylor Hedberg <[email protected]>
Copyright: (c) 2011 Bartosz Ćwikłowski
Category: Development
Build-type: Simple
Stability: provisional
Bug-reports: https://github.com/tmhedberg/hsenv/issues
Package-url: http://hackage.haskell.org/package/hsenv
Tested-with: GHC == 6.12.3, GHC == 7.0.4, GHC == 7.4.2, GHC == 7.6.1
Data-files: hsenv.el, README.md
Extra-source-files: skeletons/activate, skeletons/cabal, skeletons/cabal_config, skeletons/ghc, skeletons/ghc-mod,
skeletons/ghc-pkg, skeletons/ghci, skeletons/runghc
Cabal-version: >=1.6
Executable hsenv
Main-is: hsenv.hs
Hs-source-dirs: src
cpp-options: -Dcabal
Ghc-options: -threaded -Wall
Build-depends: base >= 4.2.0.0 && < 4.7
, process >= 1.0.1.2 && < 1.2
, filepath >= 1.1.0.3 && < 1.4
, directory >= 1.0.1.0 && < 1.3
, Cabal >= 1.8.0.6 && < 1.17
, mtl >= 1.1.0.2 && < 2.2
, bytestring >= 0.9.1.7 && < 0.11
, file-embed >= 0.0.4.1 && < 0.1
, split >= 0.1.4 && < 0.3
, safe >= 0.3 && < 0.4
, unix >= 2.0 && < 2.7
, http-streams >= 0.6.0.2 && <= 0.7
, io-streams >= 1.1.0.0 && <= 1.2.0.0
, hackage-db >= 1.5 && < 1.6
, zlib >= 0.5.3.3 && < 0.6
, HTTP >= 4000.2.3 && < 4000.3
, network >= 2.3.0.13 && < 2.5
, tar >= 0.4 && < 0.5
Other-modules: Util.Cabal
, Util.Args
, Util.Args.Args
, Util.Args.ArgArrow
, Util.Args.ArgDescr
, Util.Args.RawArgs
, Util.Args.GetOpt
, Util.Args.Usage
, Util.List
, Util.StaticArrowT
, Util.String
, Util.Template
, Util.IO
, Util.WordWrap
, Skeletons
, Types
, HsenvMonad
, Args
, Paths
, SanityCheck
, Process
, PackageManagement
, Actions
Source-repository head
Type: git
Location: git://github.com/tmhedberg/hsenv.git