all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] website: Add support for Haunt.
@ 2015-11-03 21:26 Mathieu Lirzin
  2015-11-03 23:21 ` Thompson, David
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Mathieu Lirzin @ 2015-11-03 21:26 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 326 bytes --]

Hello Guix,

Thanks to Alex Vong's impulse, I have implemented a first step in the
use of Dave Thompson's site generator Haunt (http://haunt.dthompson.us/)
for the GuixSD website.

I will need more details on the deployment of the website on gnu.org to
hopefully get rid of the parameter objects tweaking.

--
Mathieu Lirzin


[-- Attachment #2: 0001-website-Add-support-for-Haunt.patch --]
[-- Type: text/x-diff, Size: 3390 bytes --]

From cb8c7cde36d46d226fbe1f7f553304e850ef43ac Mon Sep 17 00:00:00 2001
From: Mathieu Lirzin <mthl@gnu.org>
Date: Tue, 3 Nov 2015 22:02:07 +0100
Subject: [PATCH] website: Add support for Haunt.

This provides a simple way to build the website locally.

* website/guixsd.scm: New file.
* website/README: Document the new build process.
---
 website/README     | 11 +++++++----
 website/guixsd.scm | 45 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 52 insertions(+), 4 deletions(-)
 create mode 100644 website/guixsd.scm

diff --git a/website/README b/website/README
index 9112726..b6d60f4 100644
--- a/website/README
+++ b/website/README
@@ -15,10 +15,13 @@ website]] which is implemented in [[https://www.gnu.org/software/guile][Guile]]
 
 * Building
 
-In this implementation, links assume =/software/guix= is the root directory of
-the website.  In order to build the website on your machine, you will want to
-modify the values of ‘(current-url-root)’ and ‘(gnu.org-root)’ parameter
-objects.
+Building the website depends on the static site generator:
+
+  - [[http://haunt.dthompson.us/][Haunt]]
+
+To build the site, run ‘haunt build -c guixsd.scm’ to compile all of
+the HTML pages.  To view the results, run ‘haunt serve -c guixsd.scm’
+and visit <http://localhost:8080> in a web browser.
 
 * Copying
 
diff --git a/website/guixsd.scm b/website/guixsd.scm
new file mode 100644
index 0000000..41d1509
--- /dev/null
+++ b/website/guixsd.scm
@@ -0,0 +1,45 @@
+;;; GuixSD website --- GNU's advanced distro website
+;;; Copyright © 2015 Mathieu Lirzin <mthl@gnu.org>
+;;;
+;;; This file is part of GuixSD website.
+;;;
+;;; GuixSD website is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or
+;;; (at your option) any later version.
+;;;
+;;; GuixSD website is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;;; General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GuixSD website.  If not, see <http://www.gnu.org/licenses/>.
+
+(use-modules (haunt site)
+             (haunt reader)
+             (haunt page)
+             (haunt html)
+             (haunt utils)
+             (haunt builder assets)
+             (ice-9 match)
+             (www)
+             (www utils))
+
+(site #:title "GNU's advanced distro and transactional package manager"
+      #:domain "gnu.org/software/guix"
+      #:default-metadata
+      '((author . "GuixSD Contributors")
+        (email  . "guix-devel@gnu.org"))
+      #:readers (list sxml-reader)
+      #:builders
+      `(,@(map (match-lambda
+                 ((file-name contents)
+                  (lambda (site posts)
+                    (parameterize
+                        ((current-url-root "")
+                         (gnu.org-root "https://www.gnu.org"))
+                      (make-page file-name (contents) sxml->html))))
+                 (_ const))
+               %web-pages)
+        ,(static-directory "static")))
-- 
2.6.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH] website: Add support for Haunt.
  2015-11-03 21:26 [PATCH] website: Add support for Haunt Mathieu Lirzin
@ 2015-11-03 23:21 ` Thompson, David
  2015-11-04  0:21 ` Daniel Pimentel
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 16+ messages in thread
From: Thompson, David @ 2015-11-03 23:21 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel

On Tue, Nov 3, 2015 at 4:26 PM, Mathieu Lirzin <mthl@gnu.org> wrote:
> Hello Guix,
>
> Thanks to Alex Vong's impulse, I have implemented a first step in the
> use of Dave Thompson's site generator Haunt (http://haunt.dthompson.us/)
> for the GuixSD website.

Wow, cool!  I'm surprised at how little code is needed to make the
basics work.  I'll have to try this patch out sometime and see what we
can do to improve it.  I'm sure we'll find a thing or two that Haunt
can do better in the process.

- Dave

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] website: Add support for Haunt.
  2015-11-03 21:26 [PATCH] website: Add support for Haunt Mathieu Lirzin
  2015-11-03 23:21 ` Thompson, David
@ 2015-11-04  0:21 ` Daniel Pimentel
  2015-11-05 21:25 ` Ludovic Courtès
  2015-11-10 12:17 ` Alex Vong
  3 siblings, 0 replies; 16+ messages in thread
From: Daniel Pimentel @ 2015-11-04  0:21 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel, guix-devel-bounces+d4n1=opmbx.org

Hi Mathieu and Guix,

> Thanks to Alex Vong's impulse, I have implemented a first step in the
> use of Dave Thompson's site generator Haunt 
> (http://haunt.dthompson.us/)
> for the GuixSD website.

It's great!

Dave helped me to build website with Haunt.

I builded my website with Haunt (git):
https://notabug.org/d4n1/guga

I copy site folder builded with Haunt to my static site (cvs) on 
savannah:
http://guga.nongnu.org/

Thanks Dave.

PS.: GUGA = GNU User Group Alagoas

-- 
Daniel Pimentel (d4n1 3:)

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] website: Add support for Haunt.
  2015-11-03 21:26 [PATCH] website: Add support for Haunt Mathieu Lirzin
  2015-11-03 23:21 ` Thompson, David
  2015-11-04  0:21 ` Daniel Pimentel
@ 2015-11-05 21:25 ` Ludovic Courtès
  2015-11-05 21:48   ` Thompson, David
  2015-11-10 12:17 ` Alex Vong
  3 siblings, 1 reply; 16+ messages in thread
From: Ludovic Courtès @ 2015-11-05 21:25 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel

Mathieu Lirzin <mthl@gnu.org> skribis:

> +Building the website depends on the static site generator:
> +
> +  - [[http://haunt.dthompson.us/][Haunt]]
> +
> +To build the site, run ‘haunt build -c guixsd.scm’ to compile all of
> +the HTML pages.  To view the results, run ‘haunt serve -c guixsd.scm’
> +and visit <http://localhost:8080> in a web browser.

This looks nice.

Is there a way to specify the output directory for the generated HTML?

Currently I do:

  (export-web-site "/path/to/cvs/checkout")

so the HTML ends up directly in the right place.

Does the generated HTML change as a result of using Haunt?

Thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] website: Add support for Haunt.
  2015-11-05 21:25 ` Ludovic Courtès
@ 2015-11-05 21:48   ` Thompson, David
  2015-11-05 23:50     ` Mathieu Lirzin
  2015-11-06 20:47     ` Ludovic Courtès
  0 siblings, 2 replies; 16+ messages in thread
From: Thompson, David @ 2015-11-05 21:48 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

On Thu, Nov 5, 2015 at 4:25 PM, Ludovic Courtès <ludo@gnu.org> wrote:
> Mathieu Lirzin <mthl@gnu.org> skribis:
>
>> +Building the website depends on the static site generator:
>> +
>> +  - [[http://haunt.dthompson.us/][Haunt]]
>> +
>> +To build the site, run ‘haunt build -c guixsd.scm’ to compile all of
>> +the HTML pages.  To view the results, run ‘haunt serve -c guixsd.scm’
>> +and visit <http://localhost:8080> in a web browser.
>
> This looks nice.
>
> Is there a way to specify the output directory for the generated HTML?
>
> Currently I do:
>
>   (export-web-site "/path/to/cvs/checkout")
>
> so the HTML ends up directly in the right place.

Yes, you can tweak haunt.scm a bit:

(site ... #:build-directory "/path/to/cvs/checkout")

WARNING: Haunt builds the site afresh at each 'haunt build' run, which
means that it deletes everything in the build directory first.  Will
that be an issue here?

> Does the generated HTML change as a result of using Haunt?

Not as far as I can tell by looking at the patch.

I'm not 100% sure if Haunt really buys us anything in the case of this
site.  Mathieu, do you see any current or potential future advantages
to using Haunt having done this work?  I'm really happy to see more
Haunt users, but I also don't want to encourage its use where it
doesn't make sense. :)

Thanks,

- Dave

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] website: Add support for Haunt.
  2015-11-05 21:48   ` Thompson, David
@ 2015-11-05 23:50     ` Mathieu Lirzin
  2015-11-06 14:28       ` Thompson, David
  2015-11-06 20:47     ` Ludovic Courtès
  1 sibling, 1 reply; 16+ messages in thread
From: Mathieu Lirzin @ 2015-11-05 23:50 UTC (permalink / raw)
  To: Thompson, David; +Cc: guix-devel

Hi,

"Thompson, David" <dthompson2@worcester.edu> writes:

> On Thu, Nov 5, 2015 at 4:25 PM, Ludovic Courtès <ludo@gnu.org> wrote:
[...]
>> Does the generated HTML change as a result of using Haunt?
>
> Not as far as I can tell by looking at the patch.
>
> I'm not 100% sure if Haunt really buys us anything in the case of this
> site.  Mathieu, do you see any current or potential future advantages
> to using Haunt having done this work?  I'm really happy to see more
> Haunt users, but I also don't want to encourage its use where it
> doesn't make sense. :)

For now it provides us a reliable and simple command line interface for
building the website.  My hope for the future is that GuixSD website
will have a smaller code base that will use convenient generic
procedures provided by Haunt.  Of course it will depend on what would
make sense to be implemented in Haunt.  the first example I have in mind
is the the RSS/Atom feed importer implemented by Ludo in “www.scm” (used
by new Guile's website too) which IIUC could be implemented as a Haunt
reader.  This would provide somekind of RSS/Atom functional
composability. ;)

WDYT?

Continue the good work!

--
Mathieu Lrzin

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] website: Add support for Haunt.
  2015-11-05 23:50     ` Mathieu Lirzin
@ 2015-11-06 14:28       ` Thompson, David
  2015-11-06 15:11         ` Luis Felipe López Acevedo
  0 siblings, 1 reply; 16+ messages in thread
From: Thompson, David @ 2015-11-06 14:28 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel

On Thu, Nov 5, 2015 at 6:50 PM, Mathieu Lirzin <mthl@gnu.org> wrote:
> Hi,
>
> "Thompson, David" <dthompson2@worcester.edu> writes:
>
>> On Thu, Nov 5, 2015 at 4:25 PM, Ludovic Courtès <ludo@gnu.org> wrote:
> [...]
>>> Does the generated HTML change as a result of using Haunt?
>>
>> Not as far as I can tell by looking at the patch.
>>
>> I'm not 100% sure if Haunt really buys us anything in the case of this
>> site.  Mathieu, do you see any current or potential future advantages
>> to using Haunt having done this work?  I'm really happy to see more
>> Haunt users, but I also don't want to encourage its use where it
>> doesn't make sense. :)
>
> For now it provides us a reliable and simple command line interface for
> building the website.  My hope for the future is that GuixSD website
> will have a smaller code base that will use convenient generic
> procedures provided by Haunt.  Of course it will depend on what would
> make sense to be implemented in Haunt.  the first example I have in mind
> is the the RSS/Atom feed importer implemented by Ludo in “www.scm” (used
> by new Guile's website too) which IIUC could be implemented as a Haunt
> reader.  This would provide somekind of RSS/Atom functional
> composability. ;)
>
> WDYT?

Makes sense.  Let's see how it goes. :)

> Continue the good work!

I'll try.

- Dave

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] website: Add support for Haunt.
  2015-11-06 14:28       ` Thompson, David
@ 2015-11-06 15:11         ` Luis Felipe López Acevedo
  0 siblings, 0 replies; 16+ messages in thread
From: Luis Felipe López Acevedo @ 2015-11-06 15:11 UTC (permalink / raw)
  To: Thompson, David; +Cc: guix-devel

On 2015-11-06 09:28, Thompson, David wrote:
> On Thu, Nov 5, 2015 at 6:50 PM, Mathieu Lirzin <mthl@gnu.org> wrote:
>> Hi,
>> 
>> "Thompson, David" <dthompson2@worcester.edu> writes:
>> 
>>> On Thu, Nov 5, 2015 at 4:25 PM, Ludovic Courtès <ludo@gnu.org> wrote:
>> [...]
>>>> Does the generated HTML change as a result of using Haunt?
>>> 
>>> Not as far as I can tell by looking at the patch.
>>> 
>>> I'm not 100% sure if Haunt really buys us anything in the case of 
>>> this
>>> site.  Mathieu, do you see any current or potential future advantages
>>> to using Haunt having done this work?  I'm really happy to see more
>>> Haunt users, but I also don't want to encourage its use where it
>>> doesn't make sense. :)
>> 
>> For now it provides us a reliable and simple command line interface 
>> for
>> building the website.  My hope for the future is that GuixSD website
>> will have a smaller code base that will use convenient generic
>> procedures provided by Haunt.  Of course it will depend on what would
>> make sense to be implemented in Haunt.  the first example I have in 
>> mind
>> is the the RSS/Atom feed importer implemented by Ludo in “www.scm” 
>> (used
>> by new Guile's website too) which IIUC could be implemented as a Haunt
>> reader.  This would provide somekind of RSS/Atom functional
>> composability. ;)
>> 
>> WDYT?
> 
> Makes sense.  Let's see how it goes. :)

Yes, at least for me, and for potential contributors (I think), using 
Haunt commands would be very convenient specially for testing the 
website while making changes. For example, I'd like to

1. Edit source files.
2. haunt serve
3. Check that everything works in the browser.
4. Commit changes.

The problem with the current tools in the website is that copying the 
`static` directory and serving the built site are not automatic steps. I 
was using `myscript.scm` with (system) calls to `mkdir -p` directories, 
copy the `static` directory to the build directory and serve the latter 
with `python3 -m http.server`.

So, if the website can work with Haunt, great :)


-- 
Luis Felipe López Acevedo
http://sirgazil.bitbucket.org/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] website: Add support for Haunt.
  2015-11-05 21:48   ` Thompson, David
  2015-11-05 23:50     ` Mathieu Lirzin
@ 2015-11-06 20:47     ` Ludovic Courtès
  2015-11-06 20:58       ` Thompson, David
  1 sibling, 1 reply; 16+ messages in thread
From: Ludovic Courtès @ 2015-11-06 20:47 UTC (permalink / raw)
  To: Thompson, David; +Cc: guix-devel

"Thompson, David" <dthompson2@worcester.edu> skribis:

> On Thu, Nov 5, 2015 at 4:25 PM, Ludovic Courtès <ludo@gnu.org> wrote:
>> Mathieu Lirzin <mthl@gnu.org> skribis:
>>
>>> +Building the website depends on the static site generator:
>>> +
>>> +  - [[http://haunt.dthompson.us/][Haunt]]
>>> +
>>> +To build the site, run ‘haunt build -c guixsd.scm’ to compile all of
>>> +the HTML pages.  To view the results, run ‘haunt serve -c guixsd.scm’
>>> +and visit <http://localhost:8080> in a web browser.
>>
>> This looks nice.
>>
>> Is there a way to specify the output directory for the generated HTML?
>>
>> Currently I do:
>>
>>   (export-web-site "/path/to/cvs/checkout")
>>
>> so the HTML ends up directly in the right place.
>
> Yes, you can tweak haunt.scm a bit:
>
> (site ... #:build-directory "/path/to/cvs/checkout")

And from the command line?  I don’t want to hard-code /home/ludo in the
code.  :-)

> WARNING: Haunt builds the site afresh at each 'haunt build' run, which
> means that it deletes everything in the build directory first.  Will
> that be an issue here?

That should be fine.

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] website: Add support for Haunt.
  2015-11-06 20:47     ` Ludovic Courtès
@ 2015-11-06 20:58       ` Thompson, David
  2015-11-07 11:04         ` Ludovic Courtès
  0 siblings, 1 reply; 16+ messages in thread
From: Thompson, David @ 2015-11-06 20:58 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

On Fri, Nov 6, 2015 at 3:47 PM, Ludovic Courtès <ludo@gnu.org> wrote:
> "Thompson, David" <dthompson2@worcester.edu> skribis:
>
>> On Thu, Nov 5, 2015 at 4:25 PM, Ludovic Courtès <ludo@gnu.org> wrote:
>>> Mathieu Lirzin <mthl@gnu.org> skribis:
>>>
>>>> +Building the website depends on the static site generator:
>>>> +
>>>> +  - [[http://haunt.dthompson.us/][Haunt]]
>>>> +
>>>> +To build the site, run ‘haunt build -c guixsd.scm’ to compile all of
>>>> +the HTML pages.  To view the results, run ‘haunt serve -c guixsd.scm’
>>>> +and visit <http://localhost:8080> in a web browser.
>>>
>>> This looks nice.
>>>
>>> Is there a way to specify the output directory for the generated HTML?
>>>
>>> Currently I do:
>>>
>>>   (export-web-site "/path/to/cvs/checkout")
>>>
>>> so the HTML ends up directly in the right place.
>>
>> Yes, you can tweak haunt.scm a bit:
>>
>> (site ... #:build-directory "/path/to/cvs/checkout")
>
> And from the command line?  I don’t want to hard-code /home/ludo in the
> code.  :-)

I guess I need to add an option to 'haunt build' for that.

>> WARNING: Haunt builds the site afresh at each 'haunt build' run, which
>> means that it deletes everything in the build directory first.  Will
>> that be an issue here?
>
> That should be fine.

OK.  I was worried that maybe some "stateful" stuff like the manual
html pages would get clobbered or something.

- Dave

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] website: Add support for Haunt.
  2015-11-06 20:58       ` Thompson, David
@ 2015-11-07 11:04         ` Ludovic Courtès
  2015-11-09 19:09           ` Thompson, David
  0 siblings, 1 reply; 16+ messages in thread
From: Ludovic Courtès @ 2015-11-07 11:04 UTC (permalink / raw)
  To: Thompson, David; +Cc: guix-devel

"Thompson, David" <dthompson2@worcester.edu> skribis:

> On Fri, Nov 6, 2015 at 3:47 PM, Ludovic Courtès <ludo@gnu.org> wrote:

[...]

>>> WARNING: Haunt builds the site afresh at each 'haunt build' run, which
>>> means that it deletes everything in the build directory first.  Will
>>> that be an issue here?
>>
>> That should be fine.
>
> OK.  I was worried that maybe some "stateful" stuff like the manual
> html pages would get clobbered or something.

Ah yes, that would be a problem.  It thought you were only talking about
the files that Haunt generates.

Currently, there’s a bunch of files that are only in CVS, such as the
PDFs of talks and the manual.  This is not ideal, but I’m not sure how
to address that.

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] website: Add support for Haunt.
  2015-11-07 11:04         ` Ludovic Courtès
@ 2015-11-09 19:09           ` Thompson, David
  0 siblings, 0 replies; 16+ messages in thread
From: Thompson, David @ 2015-11-09 19:09 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

On Sat, Nov 7, 2015 at 6:04 AM, Ludovic Courtès <ludo@gnu.org> wrote:
> "Thompson, David" <dthompson2@worcester.edu> skribis:
>
>> On Fri, Nov 6, 2015 at 3:47 PM, Ludovic Courtès <ludo@gnu.org> wrote:
>
> [...]
>
>>>> WARNING: Haunt builds the site afresh at each 'haunt build' run, which
>>>> means that it deletes everything in the build directory first.  Will
>>>> that be an issue here?
>>>
>>> That should be fine.
>>
>> OK.  I was worried that maybe some "stateful" stuff like the manual
>> html pages would get clobbered or something.
>
> Ah yes, that would be a problem.  It thought you were only talking about
> the files that Haunt generates.
>
> Currently, there’s a bunch of files that are only in CVS, such as the
> PDFs of talks and the manual.  This is not ideal, but I’m not sure how
> to address that.

I can add a 'precious-directories' field to <site> or something to
protect "stateful" stuff.

- Dave

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] website: Add support for Haunt.
  2015-11-03 21:26 [PATCH] website: Add support for Haunt Mathieu Lirzin
                   ` (2 preceding siblings ...)
  2015-11-05 21:25 ` Ludovic Courtès
@ 2015-11-10 12:17 ` Alex Vong
  2015-11-10 16:37   ` Mathieu Lirzin
  3 siblings, 1 reply; 16+ messages in thread
From: Alex Vong @ 2015-11-10 12:17 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel

Hi,

Thanks for making this! I think miss this announcement last week.

However, there is a little problem. When I run "haunt build -c guixsd.scm",

I get the following:

alexvong1995@debian:~/guix-artwork/website$ haunt build -c guixsd.scm
Backtrace:
In ice-9/boot-9.scm:
1724: 19 [%start-stack load-stack ...]
1729: 18 [#<procedure 1368ea0 ()>]
In unknown file:
   ?: 17 [primitive-load "/home/alexvong1995/.guix-profile/bin/haunt"]
In ice-9/eval.scm:
 481: 16 [lp (#<fluid 23>) (build)]
 411: 15 [eval # #]
 411: 14 [eval # #]
In ice-9/boot-9.scm:
2401: 13 [save-module-excursion #<procedure 18e0d00 at
ice-9/boot-9.scm:4045:3 ()>]
4050: 12 [#<procedure 18e0d00 at ice-9/boot-9.scm:4045:3 ()>]
1724: 11 [%start-stack load-stack ...]
1729: 10 [#<procedure 191bae0 ()>]
In unknown file:
   ?: 9 [primitive-load "/home/alexvong1995/guix-artwork/website/guixsd.scm"]
In ice-9/eval.scm:
 505: 8 [#<procedure 1206640 at ice-9/eval.scm:499:4 (exp)>
(use-modules # # # ...)]
In ice-9/psyntax.scm:
1106: 7 [expand-top-sequence ((use-modules (haunt site) (haunt reader)
...)) () ...]
 989: 6 [scan ((use-modules (haunt site) (haunt reader) ...)) () ...]
 279: 5 [scan ((# #) #(syntax-object *unspecified* # #)) () (()) ...]
In ice-9/boot-9.scm:
3597: 4 [process-use-modules (((haunt site)) ((haunt reader)) ((haunt
page)) ...)]
 700: 3 [map #<procedure 12c6ea0 at ice-9/boot-9.scm:3597:25 (mif-args)> #]
3598: 2 [#<procedure 12c6ea0 at ice-9/boot-9.scm:3597:25 (mif-args)> ((www))]
2867: 1 [resolve-interface (www) #:select ...]
In unknown file:
   ?: 0 [scm-error misc-error #f "~A ~S" ("no code for module" (www)) #f]

ERROR: In procedure scm-error:
ERROR: no code for module (www)

Is that because I have some wrong set-up?

This is on the tail of the .bashrc:

export GUIX_LOCPATH=$HOME/.guix-profile/lib/locale
export LC_ALL=zh_TW.UTF-8
GUIX_PROFILE="$HOME/.guix-profile" \
            source "$HOME/.guix-profile/etc/profile"

This are my installed packages:

Generation 12	11月 10 2015 19:41:30	(current)
  glibc-locales	2.22	out	/gnu/store/kiwkawskr79bhvzpm7vcgbj2423jng33-glibc-locales-2.22
  fontconfig	2.11.94	out	/gnu/store/nvv5jb11x8pzbsx0y9rhwvaz7kd7j8pi-fontconfig-2.11.94
  gs-fonts	8.11	out	/gnu/store/d0ifp68l2sjnnjx5ajc1fsc6r6wp3afy-gs-fonts-8.11
  font-dejavu	2.34	out	/gnu/store/ll8n6d8vbkx63c1dg01l2m0r77jfak9b-font-dejavu-2.34
  font-gnu-freefont-ttf	20100919	out	/gnu/store/8cfhaywjkjs6yv3adzlxcwwx776pxryc-font-gnu-freefont-ttf-20100919
  youtube-dl	2015.11.01	out	/gnu/store/l3mxjdiawvjb8x24sidihz9zqj3k5n5m-youtube-dl-2015.11.01
  emacs	24.5	out	/gnu/store/3ljzggifgiy9jd4bjqd0dy0fq1s0ddks-emacs-24.5
  geiser	0.8.1	out	/gnu/store/y9dxdh394q4acmfa7xxwavzmzbqz6k6s-geiser-0.8.1
  paredit	23	out	/gnu/store/8vrkvkfj0yas370xd1d65hqgz0ra5cy0-paredit-23
  git	2.5.0	out	/gnu/store/cyvr3gk9whniixxhc1jgmjncx9981vb7-git-2.5.0
  magit	2.3.0	out	/gnu/store/ip6c3hs3h26qzjjfspykgc4injhj73mq-magit-2.3.0
  icecat	38.3.0-gnu1	out	/gnu/store/1rsr5a1gl50a1lvp6cg7102g6mjl68i0-icecat-38.3.0-gnu1
  coreutils	8.24	out	/gnu/store/q6b4jg9nhsxb6kvn87nzr2w6f2vi1gx3-coreutils-8.24
  glibc	2.22	out	/gnu/store/n96gwg9fwmxmz1bhy219v3vvmsjsk7gz-glibc-2.22
  binutils	2.25.1	out	/gnu/store/lq595bjrgav37b05bmmafigwargasy8k-binutils-2.25.1
  gcc	5.2.0	out	/gnu/store/0wq6hcbfjh5clyz6pjcqxjkl60rmijjf-gcc-5.2.0
  make	4.1	out	/gnu/store/6l2c46faxwdim1mniw80lnyd827dpg8z-make-4.1
  autoconf	2.69	out	/gnu/store/w29nf3k2yclf7b33i8iibblj67687my2-autoconf-2.69
  automake	1.15	out	/gnu/store/n164057v3j5lhihj10apqjkbsm0scl3p-automake-1.15
  autogen	5.18.6	out	/gnu/store/3gsqxw3gw862k1m1zmf2wb9p9fc30k7k-autogen-5.18.6
  perl	5.16.1	out	/gnu/store/czs63sm4l0s4a56ab38dqvkx19yzylbq-perl-5.16.1
  python	3.4.3	out	/gnu/store/y5x6c38fzrbfl80jxrgjd6py2k88x12a-python-3.4.3
  guile	2.0.11	out	/gnu/store/5i87jzm90nw8j692y7z1j2qfx16h6ni3-guile-2.0.11
  haunt	0.1	out	/gnu/store/k0cg8shqs12dh9j3a47b6hkvcrk998zg-haunt-0.1

I also try to install guile-www from tarball, but it doesn't help. I
think this make sense since haunt cannot load module from my
/usr/share/guile/site. Does anyone know how to fix it?

Thanks,
Alex

On 04/11/2015, Mathieu Lirzin <mthl@gnu.org> wrote:
> Hello Guix,
>
> Thanks to Alex Vong's impulse, I have implemented a first step in the
> use of Dave Thompson's site generator Haunt (http://haunt.dthompson.us/)
> for the GuixSD website.
>
> I will need more details on the deployment of the website on gnu.org to
> hopefully get rid of the parameter objects tweaking.
>
> --
> Mathieu Lirzin
>
>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] website: Add support for Haunt.
  2015-11-10 12:17 ` Alex Vong
@ 2015-11-10 16:37   ` Mathieu Lirzin
  2015-11-11  5:14     ` Alex Vong
  0 siblings, 1 reply; 16+ messages in thread
From: Mathieu Lirzin @ 2015-11-10 16:37 UTC (permalink / raw)
  To: Alex Vong; +Cc: guix-devel

Hi,

Alex Vong <alexvong1995@gmail.com> writes:

> However, there is a little problem. When I run "haunt build -c guixsd.scm",
>
[...]
> In unknown file:
>    ?: 0 [scm-error misc-error #f "~A ~S" ("no code for module" (www)) #f]
>
> ERROR: In procedure scm-error:
> ERROR: no code for module (www)
[...]
> This are my installed packages:
>
[...]
>   autogen	5.18.6	out	/gnu/store/3gsqxw3gw862k1m1zmf2wb9p9fc30k7k-autogen-5.18.6
>   perl	5.16.1	out	/gnu/store/czs63sm4l0s4a56ab38dqvkx19yzylbq-perl-5.16.1
>   python	3.4.3	out	/gnu/store/y5x6c38fzrbfl80jxrgjd6py2k88x12a-python-3.4.3
>   guile	2.0.11	out	/gnu/store/5i87jzm90nw8j692y7z1j2qfx16h6ni3-guile-2.0.11
>   haunt	0.1	out	/gnu/store/k0cg8shqs12dh9j3a47b6hkvcrk998zg-haunt-0.1
>
> I also try to install guile-www from tarball, but it doesn't help. I
> think this make sense since haunt cannot load module from my
> /usr/share/guile/site. Does anyone know how to fix it?

The (www) module is the module for the website which is defined in
'website/www.scm' so it not related to guile-www.

What is going on is that the current working directory is not in Guile
load path.  In the git version of Haunt, this is added automatically but
in the latest 0.1 release which is the version provided by Guix, this
feature doesn't exist. See:

  https://git.dthompson.us/haunt.git/commit/288913eff2fc308354a373c39463e48bb879ea91

Since I have only used the git version, I didn't check that.  If you
want to install the latest version from Guix, There is a development
package definition "guix.scm" in the git repository of Haunt.

Thanks for reporting the issue,

--
Mathieu Lirzin

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] website: Add support for Haunt.
  2015-11-10 16:37   ` Mathieu Lirzin
@ 2015-11-11  5:14     ` Alex Vong
  2015-11-16 23:45       ` Mathieu Lirzin
  0 siblings, 1 reply; 16+ messages in thread
From: Alex Vong @ 2015-11-11  5:14 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel

Hi,

On 11/11/2015, Mathieu Lirzin <mthl@gnu.org> wrote:
> Hi,
>
> Alex Vong <alexvong1995@gmail.com> writes:
>
>> However, there is a little problem. When I run "haunt build -c
>> guixsd.scm",
>>
> [...]
>> In unknown file:
>>    ?: 0 [scm-error misc-error #f "~A ~S" ("no code for module" (www)) #f]
>>
>> ERROR: In procedure scm-error:
>> ERROR: no code for module (www)
> [...]
>> This are my installed packages:
>>
> [...]
>>
>> autogen	5.18.6	out	/gnu/store/3gsqxw3gw862k1m1zmf2wb9p9fc30k7k-autogen-5.18.6
>>   perl	5.16.1	out	/gnu/store/czs63sm4l0s4a56ab38dqvkx19yzylbq-perl-5.16.1
>>
>> python	3.4.3	out	/gnu/store/y5x6c38fzrbfl80jxrgjd6py2k88x12a-python-3.4.3
>>
>> guile	2.0.11	out	/gnu/store/5i87jzm90nw8j692y7z1j2qfx16h6ni3-guile-2.0.11
>>   haunt	0.1	out	/gnu/store/k0cg8shqs12dh9j3a47b6hkvcrk998zg-haunt-0.1
>>
>> I also try to install guile-www from tarball, but it doesn't help. I
>> think this make sense since haunt cannot load module from my
>> /usr/share/guile/site. Does anyone know how to fix it?
>
> The (www) module is the module for the website which is defined in
> 'website/www.scm' so it not related to guile-www.
>
> What is going on is that the current working directory is not in Guile
> load path.  In the git version of Haunt, this is added automatically but
> in the latest 0.1 release which is the version provided by Guix, this
> feature doesn't exist. See:
>
>
> https://git.dthompson.us/haunt.git/commit/288913eff2fc308354a373c39463e48bb879ea91
>
> Since I have only used the git version, I didn't check that.  If you
> want to install the latest version from Guix, There is a development
> package definition "guix.scm" in the git repository of Haunt.
>
> Thanks for reporting the issue,
>
> --
> Mathieu Lirzin
>

I have followed your instruction but there is still a problem. After I
run `guix build -f guix.scm`, I try to run:

alexvong1995@debian:~$
/gnu/store/n8r3jj2jhs5xvpcf2d4crqk706089sxa-haunt-0.1/bin/haunt --help
Backtrace:
In ice-9/boot-9.scm:
 157: 17 [catch #t #<catch-closure 2147840> ...]
In unknown file:
   ?: 16 [apply-smob/1 #<catch-closure 2147840>]
In ice-9/boot-9.scm:
  63: 15 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
 432: 14 [eval # #]
In ice-9/boot-9.scm:
2401: 13 [save-module-excursion #<procedure 2164940 at
ice-9/boot-9.scm:4045:3 ()>]
4050: 12 [#<procedure 2164940 at ice-9/boot-9.scm:4045:3 ()>]
1724: 11 [%start-stack load-stack ...]
1729: 10 [#<procedure 217aea0 ()>]
In unknown file:
   ?: 9 [primitive-load
"/gnu/store/n8r3jj2jhs5xvpcf2d4crqk706089sxa-haunt-0.1/bin/haunt"]
In ice-9/eval.scm:
 505: 8 [#<procedure 20186a0 at ice-9/eval.scm:499:4 (exp)> (use-modules #)]
In ice-9/psyntax.scm:
1106: 7 [expand-top-sequence ((use-modules (haunt ui))) () ...]
 989: 6 [scan ((use-modules (haunt ui))) () ...]
 279: 5 [scan ((# #) #(syntax-object *unspecified* # #)) () (()) ...]
In ice-9/boot-9.scm:
3597: 4 [process-use-modules (((haunt ui)))]
 702: 3 [map #<procedure 20d9d00 at ice-9/boot-9.scm:3597:25 (mif-args)> ((#))]
3598: 2 [#<procedure 20d9d00 at ice-9/boot-9.scm:3597:25 (mif-args)>
((haunt ui))]
2867: 1 [resolve-interface (haunt ui) #:select ...]
In unknown file:
   ?: 0 [scm-error misc-error #f "~A ~S" ("no code for module" (haunt ui)) #f]

ERROR: In procedure scm-error:
ERROR: no code for module (haunt ui)

Thanks for your help!

Cheers,
Alex

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] website: Add support for Haunt.
  2015-11-11  5:14     ` Alex Vong
@ 2015-11-16 23:45       ` Mathieu Lirzin
  0 siblings, 0 replies; 16+ messages in thread
From: Mathieu Lirzin @ 2015-11-16 23:45 UTC (permalink / raw)
  To: Alex Vong; +Cc: guix-devel

Hi,

Sorry for my late answer.

Alex Vong <alexvong1995@gmail.com> writes:

> I have followed your instruction but there is still a problem. After I
> run `guix build -f guix.scm`, I try to run:
>
> alexvong1995@debian:~$
> /gnu/store/n8r3jj2jhs5xvpcf2d4crqk706089sxa-haunt-0.1/bin/haunt --help
> Backtrace:
> In ice-9/boot-9.scm:
>  157: 17 [catch #t #<catch-closure 2147840> ...]
> In unknown file:
>    ?: 16 [apply-smob/1 #<catch-closure 2147840>]
> In ice-9/boot-9.scm:
>   63: 15 [call-with-prompt prompt0 ...]
> In ice-9/eval.scm:
>  432: 14 [eval # #]
> In ice-9/boot-9.scm:
> 2401: 13 [save-module-excursion #<procedure 2164940 at
> ice-9/boot-9.scm:4045:3 ()>]
> 4050: 12 [#<procedure 2164940 at ice-9/boot-9.scm:4045:3 ()>]
> 1724: 11 [%start-stack load-stack ...]
> 1729: 10 [#<procedure 217aea0 ()>]
> In unknown file:
>    ?: 9 [primitive-load
> "/gnu/store/n8r3jj2jhs5xvpcf2d4crqk706089sxa-haunt-0.1/bin/haunt"]
> In ice-9/eval.scm:
>  505: 8 [#<procedure 20186a0 at ice-9/eval.scm:499:4 (exp)> (use-modules #)]
> In ice-9/psyntax.scm:
> 1106: 7 [expand-top-sequence ((use-modules (haunt ui))) () ...]
>  989: 6 [scan ((use-modules (haunt ui))) () ...]
>  279: 5 [scan ((# #) #(syntax-object *unspecified* # #)) () (()) ...]
> In ice-9/boot-9.scm:
> 3597: 4 [process-use-modules (((haunt ui)))]
>  702: 3 [map #<procedure 20d9d00 at ice-9/boot-9.scm:3597:25 (mif-args)> ((#))]
> 3598: 2 [#<procedure 20d9d00 at ice-9/boot-9.scm:3597:25 (mif-args)>
> ((haunt ui))]
> 2867: 1 [resolve-interface (haunt ui) #:select ...]
> In unknown file:
>    ?: 0 [scm-error misc-error #f "~A ~S" ("no code for module" (haunt ui)) #f]
>
> ERROR: In procedure scm-error:
> ERROR: no code for module (haunt ui)
>
> Thanks for your help!
>
> Cheers,
> Alex

The problem is that your guile related environment variables are not
correctly set to find random guile modules in /gnu/store.  Since you
have (correctly) defined:

  GUIX_PROFILE="$HOME/.guix-profile" \
    source "$HOME/.guix-profile/etc/profile"

It is required to install the package in your profile with:

  guix package -i $(guix build -f guix.scm)

As a result ~/.guix-profile/share/guile/site/2.0/haunt will be created
and GUILE_LOAD_PATH and GUILE_LOAD_COMPILED_PATH will be able to find
the (haunt ...) modules when XXX/bin/haunt is executed.

Does it makes sense?

--
Mathieu Lirzin

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2015-11-16 23:45 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-03 21:26 [PATCH] website: Add support for Haunt Mathieu Lirzin
2015-11-03 23:21 ` Thompson, David
2015-11-04  0:21 ` Daniel Pimentel
2015-11-05 21:25 ` Ludovic Courtès
2015-11-05 21:48   ` Thompson, David
2015-11-05 23:50     ` Mathieu Lirzin
2015-11-06 14:28       ` Thompson, David
2015-11-06 15:11         ` Luis Felipe López Acevedo
2015-11-06 20:47     ` Ludovic Courtès
2015-11-06 20:58       ` Thompson, David
2015-11-07 11:04         ` Ludovic Courtès
2015-11-09 19:09           ` Thompson, David
2015-11-10 12:17 ` Alex Vong
2015-11-10 16:37   ` Mathieu Lirzin
2015-11-11  5:14     ` Alex Vong
2015-11-16 23:45       ` Mathieu Lirzin

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.