Add Guix build file.

* guix.scm: New file.
* README.org (Hacking): Mention it.
This commit is contained in:
Ludovic Courtès 2021-10-14 12:55:54 +02:00
parent d48801509a
commit 1345486061
3 changed files with 52 additions and 0 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
site/
*~

View File

@ -21,5 +21,11 @@ haunt serve -w
Now browse to http://localhost:8080/ and rejoice!
Alternatively, you can build the site /via/ Guix with:
#+BEGIN_SRC sh
guix build -f guix.scm
#+END_SRC
* License
The sources of this website are made available to you under the Affero General Public License, either version 3 of the license or (at your option) any later version.

45
guix.scm Normal file
View File

@ -0,0 +1,45 @@
;; -*- geiser-scheme-implementation: guile -*-
;;; Bootstrappable.org website
;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of the Bootstrappable.org website.
;;;
;;; The Bootstrappable.org website is free software; you can
;;; redistribute it and/or modify it under the terms of the Affero
;;; General Public License as published by the Free Software
;;; Foundation; either version 3 of the License, or (at your option)
;;; any later version.
;;;
;;; The Bootstrappable.org 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 Affero General Public
;;; License along with these source files. If not, see
;;; <http://www.gnu.org/licenses/>.
;;;
;;; Run 'guix build -f guix.scm' to build the web site.
;;;
(use-modules (gnu) (guix)
((guix git-download) #:select (git-predicate))
(gnu packages guile-xyz))
(define this-directory
(dirname (current-filename)))
(define source
(local-file this-directory "bootstrappable.org-checkout"
#:recursive? #t
#:select? (git-predicate this-directory)))
(computed-file "bootstrappable.org"
(with-imported-modules '((guix build utils))
#~(begin
(use-modules (guix build utils))
(copy-recursively #$source ".")
(invoke #$(file-append haunt "/bin/haunt") "build")
(copy-recursively "site" #$output))))