;; SPDX-License-Identifier: CC0-1.0 ;; Copyright (C) 2022 Wojtek Kosior ;; ;; Available under the terms of Creative Commons Zero v1.0 Universal. (define-module (sheets-websites)) (use-modules (ice-9 rdelim) (ice-9 regex)) (define %source-dir (let* ((this-file (search-path %load-path "sheets-websites.scm")) (proj-dir (dirname (dirname this-file)))) (cond ((equal? proj-dir ".") (getcwd)) ((absolute-file-name? proj-dir) proj-dir) (#t (string-append (getcwd) "/" proj-dir))))) (use-modules (guix packages) (guix build-system copy) (guix gexp) ((guix licenses) #:prefix license:)) (define-public sheets-websites (package (name "sheets-websites") (version "current") (source (local-file %source-dir #:recursive? #t)) (build-system copy-build-system) (arguments `(#:phases (let ((call-make-on-websites (lambda (outputs target) (let ((out (assoc-ref outputs "out"))) (for-each (lambda (website) (invoke "make" target (string-append "WEBSITE=" website) (string-append "DEST=" out "/share/" website "-website"))) '("pray" "sheets")))))) (modify-phases %standard-phases (add-before 'install 'build (lambda* (#:key outputs #:allow-other-keys) (call-make-on-websites outputs "all"))) (add-after 'install 'install-websites (lambda* (#:key outputs #:allow-other-keys) (call-make-on-websites outputs "install"))))) #:install-plan '())) (home-page "https://git.koszko.org/sheets-websites/") (synopsis "Sheets websites files") (description "This is the packaging of the websites at pray.koszko.org and sheets.koszko.org.") (license (list license:cc0 (license:x11-style "file://LICENSES/LicenseRef-Normalize-CSS-MIT.txt")))))