~brettgilio/org-webring

2

WIP: Guix package.

Details
Message ID
<875z92iqlm.fsf@posteo.ro>
DKIM signature
pass
Download raw message
Hi,

I was thinking about how we should proceed regarding writing a Guix
package definition. Should we include a guix.scm file in the project,
should we send a patch directly to Guix? Maybe both? Let me know what
you think.

Anyways, here's what I have so far:

--8<---------------cut here---------------start------------->8---
(use-modules (gnu packages emacs)
	     (gnu packages emacs-xyz)
	     (guix)
	     (guix build-system emacs)
	     (guix git-download)
	     (guix packages)
	     ((guix licenses) #:prefix license:))

(define-public emacs-org-webring
  (package
    (name "emacs-org-webring")
    (version "1.5")
    (source
     (origin
       (method url-fetch)
       (uri
	(string-append "https://git.sr.ht/~brettgilio/org-webring/archive/"
		       version ".tar.gz"))
       (sha256
	(base32 "0jlgz3kvmrq69maipq4fswvszvdfnamz6fzs9m12nc2pm80rsaxa"))))
    (build-system emacs-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
	 (add-after 'install 'install-assets
	   (lambda* (#:key outputs #:allow-other-keys)
	     (let* ((out (assoc-ref outputs "out"))
		    (assets
		     (string-append out "/share/emacs/site-lisp/assets")))
	       (mkdir-p assets)
	       (copy-recursively "assets" assets)
	       #t))))))
    (propagated-inputs
     `(("emacs-xmlgen" ,emacs-xmlgen)))
    (home-page "https://git.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+)))

emacs-org-webring
--8<---------------cut here---------------end--------------->8---

You can put this in a file and install it with "guix package -f your_file".

The org-webring-copy-css and org-webring-copy-ring functions don't
work. That could be fixed by some substitute* magic (to set the value of
org-webring-directory-of-file manually?) but I couldn't figure it out
yet. Help would be appreciated.

Cheers,
Sergiu
Details
Message ID
<877dti6wtu.fsf@gnu.org>
In-Reply-To
<875z92iqlm.fsf@posteo.ro> (view parent)
DKIM signature
missing
Download raw message
Alexandru-Sergiu Marton <brown121407@posteo.ro> writes:

> Hi,
>
> I was thinking about how we should proceed regarding writing a Guix
> package definition. Should we include a guix.scm file in the project,
> should we send a patch directly to Guix? Maybe both? Let me know what
> you think.

I am fine adding guix.scm to an /etc directory.


>     (source
>      (origin
>        (method url-fetch)
>        (uri
> 	(string-append "https://git.sr.ht/~brettgilio/org-webring/archive/"
> 		       version ".tar.gz"))
>        (sha256
> 	(base32
>      "0jlgz3kvmrq69maipq4fswvszvdfnamz6fzs9m12nc2pm80rsaxa"))))

I think the standard now adays is to git-fetch by tag rather than
url-fetch by tarball. However, I think this is because it became
apparent that tarballs on Github can be unstable. I don't know if this
is true or not for sourcehut.

>     (build-system emacs-build-system)
>     (arguments
>      `(#:phases
>        (modify-phases %standard-phases
> 	 (add-after 'install 'install-assets
> 	   (lambda* (#:key outputs #:allow-other-keys)
> 	     (let* ((out (assoc-ref outputs "out"))
> 		    (assets
> 		     (string-append out "/share/emacs/site-lisp/assets")))
> 	       (mkdir-p assets)
> 	       (copy-recursively "assets" assets)
> 	       #t))))))

Since the assets are not elisp they should not be installed to
site-lisp, instead lets install them to /share/emacs/org-webring-assets.


>     (propagated-inputs
>      `(("emacs-xmlgen" ,emacs-xmlgen)))

I know that xmlgen is our only /external/ dependency, but I am unsure if
we should add ,emacs-org for good measure or just leave it how it is.

>     (home-page "https://git.sr.ht/~brettgilio/org-webring")

The homepage is technically the project page,
https://sr.ht/~brettgilio/org-webring/.

>     (license license:gpl3+)))

I released our CSS file to the public domain. I am unsure if that means
we have to add a license list with both gpl3+ and public-domain or
not. I honestly don't understand if CSS is treated as code or what.


> The org-webring-copy-css and org-webring-copy-ring functions don't
> work. That could be fixed by some substitute* magic (to set the value of
> org-webring-directory-of-file manually?) but I couldn't figure it out
> yet. Help would be appreciated.

I'll look into this when I get a free moment. Perhaps we need to open a
TODO for this.

Brett Gilio
Details
Message ID
<87a6ydjntd.fsf@gnu.org>
In-Reply-To
<877dti6wtu.fsf@gnu.org> (view parent)
DKIM signature
missing
Download raw message
Update: You may now find a modified guix.scm file for use @
https://git.sr.ht/~brettgilio/org-webring/tree/master/etc/guix.scm.

The copying functions are not going to work, as extra work is still
needed to properly substitute the asset files. This will be fixed soon.

I have also added documentation about how to install org-webring to the README.
Export thread (mbox)