about summary refs log tree commit diff
path: root/.guix
diff options
context:
space:
mode:
authorArun Isaac2026-11-12 00:34:26 +0000
committerArun Isaac2026-11-12 00:44:41 +0000
commitaea06b2bd12a2f6b9c87fccb6b8f9bb1255aa73d (patch)
tree1467f9d83e67d7873e29b2fe4d03d926aac189b1 /.guix
parent5bebae462e382b6679a0040ce72da5db23bb1031 (diff)
downloadkaagum-aea06b2bd12a2f6b9c87fccb6b8f9bb1255aa73d.tar.gz
kaagum-aea06b2bd12a2f6b9c87fccb6b8f9bb1255aa73d.tar.lz
kaagum-aea06b2bd12a2f6b9c87fccb6b8f9bb1255aa73d.zip
Add website.
Diffstat (limited to '.guix')
-rw-r--r--.guix/kaagum-website.scm62
1 files changed, 62 insertions, 0 deletions
diff --git a/.guix/kaagum-website.scm b/.guix/kaagum-website.scm
new file mode 100644
index 0000000..41466b6
--- /dev/null
+++ b/.guix/kaagum-website.scm
@@ -0,0 +1,62 @@
+;;; kaagum --- Tiny, security-focused AI agent in Guile
+;;; Copyright © 2026 Arun Isaac <arunisaac@systemreboot.net>
+;;;
+;;; This file is part of kaagum.
+;;;
+;;; kaagum 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.
+;;;
+;;; kaagum 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 kaagum.  If not, see <https://www.gnu.org/licenses/>.
+
+(define-module (kaagum-website)
+  #:use-module ((gnu packages fonts) #:select (font-charter font-fira-code))
+  #:use-module ((gnu packages haskell-xyz) #:select (pandoc))
+  #:use-module (guix gexp)
+  #:use-module (guix packages)
+  #:use-module ((kaagum-package) #:select (kaagum)))
+
+(define kaagum-website-home-page-gexp
+  (with-imported-modules '((guix build utils))
+    #~(begin
+        (use-modules (guix build utils))
+
+        (copy-file #$(file-append (package-source kaagum)
+                                  "/README.md")
+                   "README.md")
+        (invoke #$(file-append pandoc "/bin/pandoc")
+                "--standalone"
+                "--metadata" "title=kaagum"
+                "--metadata" "document-css=false"
+                "--css=style.css"
+                "--from=gfm"
+                (string-append "--output=" #$output)
+                "README.md"))))
+
+(define-public kaagum-website
+  (file-union "kaagum-website"
+              `(("index.html"
+                 ,(computed-file "kaagum-website-home-page.html"
+                                 kaagum-website-home-page-gexp))
+                ("style.css" ,(local-file "../website/style.css"))
+                ("fonts/charter_regular.woff2"
+                 ,(file-append font-charter
+                               "/share/fonts/web/charter_regular.woff2"))
+                ("fonts/FiraCode-Regular.woff2"
+                 ,(file-append font-fira-code
+                               "/share/fonts/web/FiraCode-Regular.woff2"))
+                ("fonts/FiraCode-SemiBold.woff2"
+                 ,(file-append font-fira-code
+                               "/share/fonts/web/FiraCode-SemiBold.woff2")))))
+
+;; A quick wrapper to emulate how guix-forge serves the kaagum website under a
+;; /kaagum prefix
+(file-union "kaagum-website"
+            `(("kaagum" ,kaagum-website)))