Closed ag91 closed 5 months ago
I've updated my version of the package with some additional steps to make the contrib molds work automatically with Guix versions of the binaries:
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-bin-locations
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((file "molds/contrib.el"))
(chmod file #o644)
(substitute* file
(("\\(executable-find \"graph\"\\)")
(string-append "(executable-find \"" (which "graph") "\")"))
(("\\(executable-find \"dot\"\\)")
(string-append "(executable-find \"" (which "graph") "\")")))))))))
(inputs
`(("graphviz" ,graphviz)
("graph-cli" ,python-graph-cli)))
This turns sexpr's like
(executable-find "graph")
into
(executable-find "/gnu/store/4vkxk3wvmvd5gvijp5qx23p9z5fpbx6s-python-graph-cli-0.1.17/bin/graph")
This allows the moldable-emacs Guix package to work without the user having to install additional tools (they are on the user's machine -- this isn't magic -- but in /gnu/store
, and not in the user's path). As Guix changes packages, these references will automatically get updated, and the emacs-moldable-emacs
package will automatically update too. I.e., the Guix package definition doesn't necessarily change, but on disk, the elisp code will be different.
Please note, that I have not yet upstreamed python-graph-cli
, so you may want to leave out those bits for now.
I will close this as likely pretty outdated, but feel free to reopen contribute to it if you wish to.
Attempt at making a guix recipe for moldable-emacs copying from https://github.com/kat-co/guix-channels/blob/upstream-staging/upstream/packages/emacs-xyz.scm#L256-L281 (I just made that using the local code).