Turn repo into a guix channel #4

Merged
juliana merged 7 commits from :main into main 2024-03-01 21:21:47 +00:00
Owner

With this, the repo itself is a guix channel, thus allowing anyone to use it as a package source.

With this, the repo itself is a guix channel, thus allowing anyone to use it as a package source.
TakeV added 1 commit 2024-02-27 01:37:25 +00:00
vv requested review from juliana 2024-02-27 12:40:34 +00:00
Owner

i'll let juli review as i dont really get the details here.

i'll let juli review as i dont really get the details here.
TakeV added 1 commit 2024-02-28 00:34:25 +00:00
Author
Owner

Fixed the merge conflict.

Fixed the merge conflict.
TakeV added 2 commits 2024-02-28 00:45:41 +00:00
juliana reviewed 2024-02-29 21:09:04 +00:00
juliana left a comment
Owner

I've provided a few comments and opened some discussion about how things are done. As always, feel free to disagree with or straight up ignore my comments :3

In general, as long as the channel works, this should be fine. Just make sure the channel works.

ETA: I forgot to mention, the channel should also be documented in both the README and the .texi file.

I've provided a few comments and opened some discussion about how things are done. As always, feel free to disagree with or straight up ignore my comments :3 In general, as long as the channel works, this should be fine. Just make sure the channel works. ETA: I forgot to mention, the channel should also be documented in both the README and the `.texi` file.
@ -0,0 +1,49 @@
(use-modules (gnu packages)
Owner

Doesn't this need to be a define-module to work properly, with the package as a publicly-exported symbol?

Doesn't this need to be a `define-module` to work properly, with the package as a publicly-exported symbol?
Author
Owner

Oh yeah, it does. Lemme fix that.

Oh yeah, it does. Lemme fix that.
TakeV marked this conversation as resolved
guix.scm Outdated
Owner

I don't think this is quite the right move. IIUC the package object needs to be in a Guile module and exported publicly so it can be imported. Meanwhile, the guix.scm file needs to evaluate directly to a package object. I think the optimal route here is to define the package in the module file then load and import that file into guix.scm, which would then simply return the symbol for the package.

So guix.scm would be something like...

(load ".guix/modules/guile-termenv.scm")
(use-modules (guile-termenv))

guile-termenv

I'm also not sure about the naming scheme for the package file and module. guile-termenv makes sense for the Guix name for the package, and as a general name for the project to differentiate from the original; but it looks weird in a module name. Maybe instead make the namespace termenv package or termenv-package? The former would give us a file called .guix/modules/termenv/package.scm while the latter would give us .guix/modules/termenv-package.scm. I dislike the hyphenation in a module name, but it's probably more reasonable than adding a mostly-empty directory.

I don't think this is quite the right move. IIUC the package object needs to be in a Guile module and exported publicly so it can be imported. Meanwhile, the `guix.scm` file needs to evaluate directly to a package object. I think the optimal route here is to define the package in the module file then `load` and `import` that file into `guix.scm`, which would then simply return the symbol for the package. So `guix.scm` would be something like... ``` (load ".guix/modules/guile-termenv.scm") (use-modules (guile-termenv)) guile-termenv ``` I'm also not sure about the naming scheme for the package file and module. `guile-termenv` makes sense for the Guix name for the package, and as a general name for the project to differentiate from the original; but it looks weird in a module name. Maybe instead make the namespace `termenv package` or `termenv-package`? The former would give us a file called `.guix/modules/termenv/package.scm` while the latter would give us `.guix/modules/termenv-package.scm`. I dislike the hyphenation in a module name, but it's probably more reasonable than adding a mostly-empty directory.
Author
Owner

I went ahead and switched the format to be the load/import/return style you suggested.

I went ahead and switched the format to be the load/import/return style you suggested.
juliana marked this conversation as resolved
hall.scm Outdated
@ -17,4 +19,3 @@
(native-language-support #f)
(licensing #f)))
(files (libraries
((directory "termenv"
Owner

This indentation is all kinds of wonky; we need to setup a .dir-locals.el for this project so we can get consistent styling. I'll try to remember to cannibalize the Guix one after this review; it's not all useful outside of Guix proper, but it's a good starting point.

This indentation is all kinds of wonky; we need to setup a `.dir-locals.el` for this project so we can get consistent styling. I'll try to remember to cannibalize the Guix one after this review; it's not all useful outside of Guix proper, but it's a good starting point.
Author
Owner

Regrettably, I think the formatting is due to hall itself. :(

Regrettably, I think the formatting is due to hall itself. :(
juliana marked this conversation as resolved
TakeV added 2 commits 2024-03-01 21:06:01 +00:00
f1d09c368d
Make the guix.scm file load guile-termenv and return it
This means we no longer use a symlink. We also needed to define a
module for the guile-termenv file.
juliana requested changes 2024-03-01 21:12:52 +00:00
juliana left a comment
Owner

Aside from that one small comment, LGTM. Make that change and it'll be ready to go!

Aside from that one small comment, LGTM. Make that change and it'll be ready to go!
@ -0,0 +1,50 @@
(define-module (termenv-package))
(use-modules (gnu packages)
Owner

Make sure to put these in the module definition

Make sure to put these in the module definition
Author
Owner

Fixed.

Fixed.
juliana marked this conversation as resolved
TakeV added 1 commit 2024-03-01 21:20:29 +00:00
juliana merged commit d02e256bb7 into main 2024-03-01 21:21:47 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: solarpunk-guile/guile-termenv#4
No description provided.