stackage-server/templates/stackage-home.hamlet
2014-10-24 13:50:59 +03:00

147 lines
6.1 KiB
Plaintext

$newline never
<div .container>
<h1>
#{stackageTitle stackage}
<p>
Published on #{yearMonthDay (stackageUploaded stackage)}
$if hasBundle
<span .separator>
<span>
<a href=@{StackageMetadataR ident} title="View metadata on this snapshot, such as package versions">
\Metadata
<span .separator>
<span>
<a href=@{StackageBundleR ident} title="This is useful for making modifications to an existing snapshot">
\Bundle
<span .separator>
<span>
<a href=@{StackageCabalConfigR ident} title="If you want to stick with upstream Hackage but get a stable package set">
\cabal.config
$if stackageHasHaddocks stackage
<span .separator>
<span>
<a href=@{HaddockR ident []}>Haddocks
$if isOwner
<p>
You are the owner of this snapshot. You can #
<a href=@{UploadHaddockR ident}>upload haddocks#
.
<p>
<pre>
remote-repo: stackage:@{StackageHomeR ident}
$maybe _ <- minclusive
<p>
<a href="https://github.com/fpco/stackage/wiki/Stackage-Server-FAQ#whats-the-difference-between-inclusive-and-exclusive-snapshots">What's the difference between inclusive and exclusive snapshots?</a>
<h3>
Setup guide #
<small>
(click to expand)
<div class="accordion" id="accordion2">
$maybe inclusive <- minclusive
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion0" href="#collapse0">
<span .number>#{base + 0}
Check whether you want an inclusive or exclusive snapshot
<div id="collapse0" class="accordion-body collapse">
<div class="accordion-inner">
<p>
This snapshot is: #
<strong>
$if inclusive
inclusive
$else
exclusive
<p>
$if inclusive
This means that it contains packages from Hackage too,
\ which are not guaranteed to build.
$else
This means that it contains only packages that build
\ and have been tested (excludes packages from Hackage
\ that <em>may</em> or may not build).
<p>
For a detailed explanation of the differences and reasons for inclusive and exclusive snapshots, see <a href="https://github.com/fpco/stackage/wiki/Stackage-Server-FAQ#whats-the-difference-between-inclusive-and-exclusive-snapshots">the FAQ on this topic</a>.
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion#{base + 0}" href="#collapse1">
<span .number>#{base + 1}
Copy the
<code>remote-repo
line to your Cabal configuration file
<div id="collapse1" class="accordion-body collapse">
<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-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion#{base + 0}" href="#collapse2">
<span .number>#{base + 2}
Remove any existing package config
<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/&lt;os&gt;-&lt;ghc-version&gt;
\ 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-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion#{base + 0}" href="#collapse3">
<span .number>#{base + 3}
Run
<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>
Now you're ready to install packages!