diff --git a/.gitignore b/.gitignore index 45ddf0a..1615c0f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ site/ +*~ diff --git a/README.org b/README.org index 0584ac4..c8784e9 100644 --- a/README.org +++ b/README.org @@ -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. diff --git a/guix.scm b/guix.scm new file mode 100644 index 0000000..393c66e --- /dev/null +++ b/guix.scm @@ -0,0 +1,45 @@ +;; -*- geiser-scheme-implementation: guile -*- +;;; Bootstrappable.org website +;;; Copyright © 2021 Ludovic Courtès +;;; +;;; 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 +;;; . + +;;; +;;; 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))))