about summary refs log tree commit diff
path: root/.guix/guile-xapian-website.scm
diff options
context:
space:
mode:
authorArun Isaac2026-09-24 02:01:24 +0100
committerArun Isaac2026-09-24 02:48:41 +0100
commitf6bba70391b887588c9c4652a683db89bb4ecb3a (patch)
tree08a5404eaa1e259c861d699d82728b5a7eb3e48b /.guix/guile-xapian-website.scm
parent70c50d83b0ba1bcafe9af7f6d4c114290a2147cc (diff)
downloadguile-xapian-f6bba70391b887588c9c4652a683db89bb4ecb3a.tar.gz
guile-xapian-f6bba70391b887588c9c4652a683db89bb4ecb3a.tar.lz
guile-xapian-f6bba70391b887588c9c4652a683db89bb4ecb3a.zip
Move website G-expression to separate file.
Diffstat (limited to '.guix/guile-xapian-website.scm')
-rw-r--r--.guix/guile-xapian-website.scm69
1 files changed, 69 insertions, 0 deletions
diff --git a/.guix/guile-xapian-website.scm b/.guix/guile-xapian-website.scm
new file mode 100644
index 0000000..9df20a6
--- /dev/null
+++ b/.guix/guile-xapian-website.scm
@@ -0,0 +1,69 @@
+;;; guile-xapian --- Guile bindings for Xapian
+;;; Copyright © 2026 Arun Isaac <arunisaac@systemreboot.net>
+;;;
+;;; This file is part of guile-xapian.
+;;;
+;;; guile-xapian 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 2 of the
+;;; License, or (at your option) any later version.
+;;;
+;;; guile-xapian 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 guile-xapian.  If not, see
+;;; <https://www.gnu.org/licenses/>.
+
+(define-module (guile-xapian-website)
+  #:use-module ((gnu packages emacs) #:select (emacs-minimal))
+  #:use-module ((guix build-system guile) #:select (%guile-build-system-modules))
+  #:use-module (guix gexp)
+  #:use-module (guix packages)
+  #:use-module (guix profiles)
+  #:use-module ((guile-xapian-package) #:select (guile-xapian)))
+
+(define guile-xapian-website-gexp
+  (let ((development-profile
+         (profile
+           (content (package->development-manifest guile-xapian)))))
+    (with-imported-modules %guile-build-system-modules
+      #~(begin
+          (use-modules (guix build guile-build-system)
+                       (guix build utils))
+
+          (copy-recursively #$(package-source guile-xapian)
+                            (getcwd))
+          (set-path-environment-variable
+           "PATH" (list "/bin") (list #$emacs-minimal #$development-profile))
+          (set-path-environment-variable
+           "C_INCLUDE_PATH" (list "/include") (list #$development-profile))
+          (set-path-environment-variable
+           "CPLUS_INCLUDE_PATH" (list "/include") (list #$development-profile))
+          (set-path-environment-variable
+           "LIBRARY_PATH" (list "/lib") (list #$development-profile))
+          (set-path-environment-variable
+           "ACLOCAL_PATH" (list "/share/aclocal") (list #$development-profile))
+          (set-path-environment-variable
+           "PKG_CONFIG_PATH" (list "/lib/pkgconfig") (list #$development-profile))
+          (set-path-environment-variable
+           "GUILE_LOAD_PATH"
+           (list (string-append "/share/guile/site/"
+                                (target-guile-effective-version)))
+           (list #$development-profile))
+          (set-path-environment-variable
+           "GUILE_LOAD_COMPILED_PATH"
+           (list (string-append "/lib/guile/" (target-guile-effective-version) "/site-ccache"))
+           (list #$development-profile))
+          (invoke "autoreconf" "--verbose" "--install" "--force")
+          (patch-shebang "configure")
+          (invoke "./configure" "CONFIG_SHELL=sh" "SHELL=sh")
+          (invoke "make" "website")
+          (copy-recursively "website" #$output)))))
+
+(define-public guile-xapian-website
+  (computed-file "guile-xapian-website" guile-xapian-website-gexp))
+
+guile-xapian-website