mirror of
https://github.com/commercialhaskell/stackage-server.git
synced 2026-01-26 10:51:56 +01:00
Update the setup guide
This commit is contained in:
parent
08598f152c
commit
6ac9623aba
@ -1,5 +1,5 @@
|
|||||||
$newline never
|
$newline never
|
||||||
<div .container>
|
<div .container .content>
|
||||||
<h1>
|
<h1>
|
||||||
#{stackageTitle stackage}
|
#{stackageTitle stackage}
|
||||||
<p>
|
<p>
|
||||||
@ -7,17 +7,13 @@ $newline never
|
|||||||
$if hasBundle
|
$if hasBundle
|
||||||
<span .separator>
|
<span .separator>
|
||||||
<span>
|
<span>
|
||||||
<a href=@{SnapshotR slug StackageCabalConfigR} title="If you want to stick with upstream Hackage but get a stable package set">
|
<a href=@{SnapshotR slug StackageCabalConfigR}>
|
||||||
\cabal.config
|
\cabal.config
|
||||||
$if isOwner
|
$if isOwner
|
||||||
<p>
|
<p>
|
||||||
You are the owner of this snapshot. You can #
|
You are the owner of this snapshot. You can #
|
||||||
<a href=@{UploadHaddockR $ toPathPiece slug}>upload haddocks#
|
<a href=@{UploadHaddockR $ toPathPiece slug}>upload haddocks#
|
||||||
.
|
.
|
||||||
<p>
|
|
||||||
<pre>
|
|
||||||
remote-repo: stackage-#{slug}:@{SnapshotR slug StackageHomeR}
|
|
||||||
|
|
||||||
<h3>
|
<h3>
|
||||||
Setup guide #
|
Setup guide #
|
||||||
<small>
|
<small>
|
||||||
@ -26,84 +22,34 @@ $newline never
|
|||||||
|
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion#{base + 0}" href="#collapse1">
|
<span class="accordion-toggle" data-parent="#accordion#{base + 0}" href="#collapse1">
|
||||||
<span .number>#{base + 1}
|
<span .number>1
|
||||||
Copy the
|
Download the #
|
||||||
<code>remote-repo
|
<a href=@{SnapshotR slug StackageCabalConfigR}>
|
||||||
line to your Cabal configuration file
|
\cabal.config
|
||||||
<div id="collapse1" class="accordion-body collapse">
|
\ into your project or sandbox root directory
|
||||||
<div class="accordion-inner">
|
|
||||||
<p>
|
|
||||||
Your #
|
|
||||||
<code>config
|
|
||||||
\ file for Cabal should be in your user home directory. For example:
|
|
||||||
<ul>
|
|
||||||
<li>Linux: #
|
|
||||||
<code>
|
|
||||||
/home/alonzo/.cabal/config
|
|
||||||
<li>Windows: #
|
|
||||||
<code>
|
|
||||||
C:\Users\alonzo\AppData\Roaming\cabal\config
|
|
||||||
<p>Once you have this open, find the line that says:
|
|
||||||
<pre>
|
|
||||||
remote-repo: hackage.haskell.org:http://hackage.haskell.org/packages/archive
|
|
||||||
<p>
|
|
||||||
Replace it with the #
|
|
||||||
<code>remote-repo
|
|
||||||
\ code sample above.
|
|
||||||
|
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion#{base + 0}" href="#collapse2">
|
<span class="accordion-toggle" data-toggle="collapse" data-parent="#accordion#{base + 0}" href="#collapse2">
|
||||||
<span .number>#{base + 2}
|
<span .number>2
|
||||||
Remove any existing package config
|
<code>cabal update
|
||||||
<div id="collapse2" class="accordion-body collapse">
|
|
||||||
<div class="accordion-inner">
|
|
||||||
<p>
|
|
||||||
If you already have installed some packages from Hackage
|
|
||||||
\ or elsewhere and you want to start from a fresh package
|
|
||||||
\ set, you can remove your
|
|
||||||
<code>ghc/<os>-<ghc-version>
|
|
||||||
\ directory.
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
In Linux, the directory is #
|
|
||||||
<code>~/.ghc
|
|
||||||
|
|
||||||
<li>
|
|
||||||
On Windows the #
|
|
||||||
<code>.ghc
|
|
||||||
\ directory, similar to the Cabal
|
|
||||||
\ configuration, will be under something like: #
|
|
||||||
<code>
|
|
||||||
C:\Users\alonzo\AppData\Roaming\ghc
|
|
||||||
|
|
||||||
<p>
|
|
||||||
To clear the GHC 7.2.2. environment, all the
|
|
||||||
\ user-installed packages, you can remove the directory #
|
|
||||||
<code>x86_64-linux-7.2.2
|
|
||||||
.
|
|
||||||
<em> Be careful
|
|
||||||
\ that you are sure
|
|
||||||
\ that you want to clear your package set (re-installing
|
|
||||||
\ packages takes time!) and that you clear the right one.
|
|
||||||
|
|
||||||
<div class="accordion-group">
|
<div class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion#{base + 0}" href="#collapse3">
|
<span class="accordion-toggle" data-toggle="collapse" data-parent="#accordion#{base + 0}" href="#collapse3">
|
||||||
<span .number>#{base + 3}
|
<span .number>3
|
||||||
Run
|
<code>cabal install
|
||||||
<code>
|
|
||||||
cabal update
|
|
||||||
<div id="collapse3" class="accordion-body collapse">
|
|
||||||
<div class="accordion-inner">
|
|
||||||
<p>
|
|
||||||
This will download the package index from Stackage and
|
|
||||||
\ update your local one.
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Now you're ready to install packages!
|
Alternatively, to exclusively use only packages that are in
|
||||||
|
Stackage, you can set your #
|
||||||
|
<code>remote-repo
|
||||||
|
\ in your Cabal #
|
||||||
|
<code>config
|
||||||
|
\ file to:
|
||||||
|
<pre>
|
||||||
|
<span class="keyword">remote-repo</span>: stackage-#{slug}:
|
||||||
|
<span class="url">@{SnapshotR slug StackageHomeR}
|
||||||
|
|
||||||
<h3>
|
<h3>
|
||||||
Packages
|
Packages
|
||||||
|
|||||||
@ -30,22 +30,26 @@ hr {
|
|||||||
|
|
||||||
.accordion-group {
|
.accordion-group {
|
||||||
border: 0;
|
border: 0;
|
||||||
.accordion-toggle:hover {
|
a.accordion-toggle:hover {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
background: #f5f5f5;
|
background: #f5f5f5;
|
||||||
border-radius: 0.5em;
|
border-radius: 0.5em;
|
||||||
}
|
}
|
||||||
|
.accordion-toggle code {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
.accordion-toggle {
|
.accordion-toggle {
|
||||||
|
cursor: default;
|
||||||
margin-left: -0.5em;
|
margin-left: -0.5em;
|
||||||
padding-left: 0.5em;
|
padding-left: 0.5em;
|
||||||
color: #555;
|
color: #555;
|
||||||
code {
|
code {
|
||||||
font-size: inherit;
|
font-size: inherit;
|
||||||
border: inherit;
|
border: inherit;
|
||||||
margin: 0.5em;
|
|
||||||
}
|
}
|
||||||
.number {
|
.number {
|
||||||
border-radius: 1em;
|
border-radius: 1em;
|
||||||
|
line-height: 1.5em;
|
||||||
background: #0981c3;
|
background: #0981c3;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@ -77,3 +81,6 @@ p + ul {
|
|||||||
.packages > .table td,.packages > .table th {
|
.packages > .table td,.packages > .table th {
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.keyword { color: #366354 }
|
||||||
|
.url { color: #06537d }
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user