diff options
author | Arun Isaac | 2024-01-12 11:25:43 +0000 |
---|---|---|
committer | Arun Isaac | 2024-01-12 11:25:43 +0000 |
commit | 8a33ab5357bbcb4796fd2a9b0aa22a999a49c824 (patch) | |
tree | bf3f20e891b5c99a30385cfd1a8dcbc0b018745e | |
parent | 591e8de8f1d6e525e6bc6ed552c8505f30b39ed6 (diff) | |
download | kolam-8a33ab5357bbcb4796fd2a9b0aa22a999a49c824.tar.gz kolam-8a33ab5357bbcb4796fd2a9b0aa22a999a49c824.tar.lz kolam-8a33ab5357bbcb4796fd2a9b0aa22a999a49c824.zip |
guix: Add G-expression computed-file to build website.
* .guix/guile-kolam-package.scm (guile-kolam-package): Import gnu-make
from (gnu packages base), bash-minimal from (gnu packages bash),
emacs-minimal from (gnu packages emacs) and guile-3.0 from (gnu
packages guile).
(guile-kolam-website-gexp, guile-kolam-website): New variables.
-rw-r--r-- | .guix/guile-kolam-package.scm | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/.guix/guile-kolam-package.scm b/.guix/guile-kolam-package.scm index 17daa95..45e8742 100644 --- a/.guix/guile-kolam-package.scm +++ b/.guix/guile-kolam-package.scm @@ -1,5 +1,5 @@ ;;; kolam --- GraphQL implementation -;;; Copyright © 2022, 2023 Arun Isaac <arunisaac@systemreboot.net> +;;; Copyright © 2022–2024 Arun Isaac <arunisaac@systemreboot.net> ;;; ;;; This file is part of kolam. ;;; @@ -18,6 +18,10 @@ ;;; <http://www.gnu.org/licenses/>. (define-module (guile-kolam-package) + #:use-module ((gnu packages base) #:select (gnu-make)) + #:use-module ((gnu packages bash) #:select (bash-minimal)) + #:use-module ((gnu packages emacs) #:select (emacs-minimal)) + #:use-module ((gnu packages guile) #:select (guile-3.0)) #:use-module ((gnu packages guile-xyz) #:select (guile-kolam) #:prefix guix:) #:use-module (guix gexp) @@ -34,4 +38,21 @@ #:select? (or (git-predicate (dirname (current-source-directory))) (const #t)))))) +(define guile-kolam-website-gexp + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + + (set-path-environment-variable + "PATH" (list "/bin") (list #$bash-minimal #$emacs-minimal + #$gnu-make #$guile-3.0)) + (copy-recursively #$(package-source guile-kolam) + (getcwd)) + (invoke "sh" "configure") + (invoke "make" "website") + (copy-recursively "website" #$output)))) + +(define-public guile-kolam-website + (computed-file "guile-kolam-website" guile-kolam-website-gexp)) + guile-kolam |