Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add guix recipe for local dev #8

Closed
wants to merge 1 commit into from
Closed

add guix recipe for local dev #8

wants to merge 1 commit into from

Conversation

ag91
Copy link
Owner

@ag91 ag91 commented Oct 10, 2021

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).

@ag91 ag91 mentioned this pull request Oct 10, 2021
@kat-co
Copy link

kat-co commented Oct 10, 2021

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.

@ag91 ag91 force-pushed the master branch 2 times, most recently from 53af4cd to ddebd70 Compare January 10, 2022 22:44
@ag91
Copy link
Owner Author

ag91 commented Mar 23, 2024

I will close this as likely pretty outdated, but feel free to reopen contribute to it if you wish to.

@ag91 ag91 closed this Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants