website: Update manifest.

* website/guix.packages: Rename to...
* website/manifest.scm: ...this.
* website/README: Update.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
zimoun 2020-10-18 02:01:06 +02:00 committed by Ludovic Courtès
parent 4900728693
commit 05e384e811
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
3 changed files with 52 additions and 21 deletions

View File

@ -14,21 +14,38 @@ following command to install all the software needed to build the
website:
#+BEGIN_EXAMPLE
$ guix package -i git glibc-locales gnutls guile guile-json guile-syntax-highlight guix haunt
guix package -m manifest.scm
#+END_EXAMPLE
*Note*: the packages =guix= and =haunt= should have the same version of Guile,
otherwise building the website is slow and raises bunch of warnings. The
manifest file takes care.
* Running the website
To try out the website locally while you work on it, run the following
commands:
#+BEGIN_EXAMPLE
$ cd path/to/guix-artwork/website
$ export GUILE_LOAD_PATH=$(guix build guile-syntax-highlight)/share/guile/site/3.0:$GUILE_LOAD_PATH
$ LC_ALL=en_US.utf8 GUIX_WEB_SITE_LOCAL=yes haunt build
$ haunt serve
cd path/to/guix-artwork/website
#+END_EXAMPLE
** Build locally
#+begin_example
GUIX_WEB_SITE_LOCAL=yes guix environment -C -m manifest.scm \
-E GUIX_LOCPATH -E LANG --share=$HOME/.guix-profile/lib/locale \
-E GUIX_WEB_SITE_LOCAL --share=/tmp \
-- haunt build
#+end_example
** Serve locally
#+begin_example
guix environment -CN -m manifest.scm \
-E GUIX_LOCPATH -E LANG --share=$HOME/.guix-profile/lib/locale \
--share=/tmp \
-- haunt serve -w
#+end_example
Then, visit http://localhost:8080/en/guix.html in a web browser.
You can stop the server pressing ~Ctrl + C~ twice.

View File

@ -1,16 +0,0 @@
;;; Packages required to develop the website.
;;; (See guix package --manifest option for more details on this file).
(use-modules (guix profiles)
(gnu packages))
(define dev-packages
(list "glibc-locales"
"guile@2.2"
"guile-syntax-highlight"
"guix"
"haunt"))
(map specification->package dev-packages)

30
website/manifest.scm Normal file
View File

@ -0,0 +1,30 @@
(use-modules (guix packages)
((gnu packages package-management) #:select (guix))
((gnu packages guile-xyz) #:select (haunt))
(srfi srfi-1))
(define the-good-guile
(car (assoc-ref (package-native-inputs guix) "guile")))
(define haunt-the-ghost
(package
(inherit haunt)
(name "haunt-for-guix-website")
(inputs
`(("guile" ,the-good-guile)
,@(alist-delete "guile" (package-inputs haunt))))))
(packages->manifest
(append
;; Guile needs to be compatible
(list
guix
the-good-guile
haunt-the-ghost)
;; Other packages
(map specification->package
(list
"glibc-locales"
"git"
"guile-syntax-highlight"))))