4638cac7dafc9e1c98a61e866567f6a624aef9db — Brett Gilio 20 days ago 3f5aab5
Add guix.scm to /etc
1 files changed, 87 insertions(+), 0 deletions(-)

A etc/guix.scm
A etc/guix.scm => etc/guix.scm +87 -0
@@ 0,0 1,87 @@
;;; Commentary:

;; This package is intended for development, and installation
;; from git HEAD. If you are wanting to install `emacs-org-webring'
;; from GNU Guix, please refer to the relevant section in the

;; This recipe is reflect of the latest development of `org-webring',
;; and is the template for merging upstream to GNU Guix.

;; Copyright (C) 2020 Brett Gilio
;; Copyright (C) 2020 Alexandru-Sergiu Marton

;;; Instructions:

;; guix build -f guix.scm
;; guix package -f guix.scm

;;; Code:

(use-modules (gnu packages emacs)
	     (gnu packages emacs-xyz)
	     (guix build utils)
	     (guix build-system emacs)
	     ((guix licenses) #:prefix license:)
	     (guix packages)
	     (ice-9 match)
	     (ice-9 popen)
	     (ice-9 rdelim)
	     (srfi srfi-1)
	     (srfi srfi-26))

(define %source-dir (dirname (dirname (current-filename))))

(define git-file?
  (let* ((pipe (with-directory-excursion
		(open-pipe* OPEN_READ "git" "ls-files")))
         (files (let loop ((lines '()))
                  (match (read-line pipe)
                    ((? eof-object?)
                     (reverse lines))
                     (loop (cons line lines))))))
         (status (close-pipe pipe)))
    (lambda (file stat)
      (match (stat:type stat)
        ('directory #t)
        ((or 'regular 'symlink)
         (any (cut string-suffix? <> file) files))
        (_ #f)))))

(define-public emacs-org-webring
   (name "emacs-org-webring")
   (version "git")
   (source (local-file %source-dir
		       #:recursive? #t
		       #:select? git-file?))
   (build-system emacs-build-system)
      (modify-phases %standard-phases
		     (add-after 'install 'install-assets
				(lambda* (#:key outputs #:allow-other-keys)
				  (let* ((out (assoc-ref outputs "out"))
					  (string-append out "/share/emacs/org-webring-assets")))
				    (mkdir-p assets)
				    (copy-recursively "assets" assets)
    `(("emacs-xmlgen" ,emacs-xmlgen)))
   (home-page "https://sr.ht/~brettgilio/org-webring")
   (synopsis "Generate webrings for Org-based sites / blogs")
   (description "Org-webring is an alternative implementation of a
feed-based webring, taking inspiration from openring by Drew DeVault.
Intended to integrate with Org-based websites and blogs (either
directly, or indirectly, as in ox-hugo), it will fetch a given list of
web feed files and correctly parse and format the elements to be
displayed for sharing.")
   (license license:gpl3+)))


;;; End.