From 8a33ab5357bbcb4796fd2a9b0aa22a999a49c824 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Fri, 12 Jan 2024 11:25:43 +0000 Subject: 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. --- .guix/guile-kolam-package.scm | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) 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 +;;; Copyright © 2022–2024 Arun Isaac ;;; ;;; This file is part of kolam. ;;; @@ -18,6 +18,10 @@ ;;; . (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 -- cgit v1.2.3