feat: allow to build using Guix#358
Conversation
|
The hash is to protect against tempering with the source code (to be sure its not building a modified version). So it will be different for each release. Although its also possible to skip that part when building by changing the version |
4bd064f to
cc6aa37
Compare
|
I think it's better to use the latest submission by default, just as the aur package does. Then, if a fixed version operation is needed, it's up to the user to decide |
4a9a7c0 to
8ac331a
Compare
|
I think it would be better to reference git repository as a source instead of using |
27e9064 to
c206693
Compare
That would prevent this repository from being used as a channel (see my MR to the Quickshell documentation). This is a significant limitation, because the entire purpose of adding a package definition to this repository is precisely to enable its use as a Guix channel. To be honest, I have not verified whether Guix handles this case differently now, but as of July it was not possible when the package's source code resides within the channel itself. A more robust solution to this issue would be the implementation of a CI action to automatically update the package hash whenever new release happens. Having channel with -git version seems impossible. |
That's unfortunate. For example, nix flake will build from current git source instead of pinned version, which is more preferable IMO. Also mango currently uses git version of scenefx (with some drawbacks introduced). I did bump scenefx version to 4.1 in Guix a while ago, but we would need to introduce About CI: I am not sure when or even if we could introduce CI to the repo (I don't know GH Actions, not sure about @DreamMaoMao or other contributors, so it might take time), but it could benefit both nix and guix packages. |
26d9a24 to
8e4d3b7
Compare
|
Good news: the git version of quickshell can now be built as a Guix channel. A previous issue has been fixed. The Quickshell channel approach is now functional with the latest Guix: I submitted a PR to quickshell to fix the modules error introduced by the recent package definition changes. @4zv4l, are you planning to update your PR with an approach similar to the quickshell channel? The current package definition is still a work in progress, it needs to also override the default config path. If you're no longer interested in working on this, I'd be happy to submit a new PR that implements that approach. Also, a question for @Yappaholic regarding mango: I haven't looked into it deeply, but does Mango have a good way to set a default config path that can be overridden from a directory /etc/mango? On Guix, that directory is not writable. When I packaged the mwc compositor, it used an environment variable MWC_DEFAULT_CONFIG_PATH to set the default path, while mwc still giving preference to the config in XDG_CONFIG_HOME. Is there a similar mechanism for Mango? If not I think we can patch source for Guix package. |
|
I would like to edit meson.build itself, but sadly in guix builder there is no /etc/os-release, so way like with Nix is not possible here |
|
It is also possible to pass |
Tried it and yes, flags appended at the end so it doesn't work |
That is unfortunate. You should patch |
That's what I did in commit I linked above (ch4og@8a79830) |
|
Also there I am patching "sysconfdir = sysconfdir.substring\(prefix.length\(\)\)" to "" which is L20 Line 20 in 1b7e998 I am not very familiar with meson so I didn't really understand why there is error without such patch: As I understand it is not string for some reason, prefix is set by guix build system itself |
It is not because you treat an option like a string when you need to use |
|
I guess that could be a nice feature but compared to "vanilla mango" why changing the config file location ? If it's to add it in the store, it's pretty easy (at least with Guix) with the dot-file home service. |
That is required feature since mango will try to load default config from /etc/mango, which doesn't exist. Of course that doesn't matter in case user has config in ~/.config/mango, but we must point mangowc to correct store location of default config. |
|
To test this: If you will set HOME env var to random dir like /tmp you will boot into mango without any default keybinds and no way to even close it without accessing another tty/ssh |
Oh I havent thought of that indeed. I am also not very experienced with Guix packaging, I saw people doing magic with some packages but thats about it. I am not sure how to retrieve the store location of the config (in the package definition itself) and then to add it in place of the |
If you are ok with this you can just pick and push my commit on your branch (ch4og@ef2f771) it is fully working like this If you'd like to add my commit into your branch, here are the Git commands in case you need help with it: |
|
done, thanks for the help ! 🙏 |
|
Good job making Guix package work! I can't test it right now (since I'm not running GuixSD), but the PR changes look good to me. Also I need to mention that |
|
After looking at the package with fresh eyes, I noticed a couple of small improvements might be needed:
For reference here is what it looks like: ch4og@0a6ed5c (These aren't blockers at all) |
… as dup in native input
I did the change and tried to build and it worked, all good for now ? |
|
Package definition now looks perfect! |
Yappaholic
left a comment
There was a problem hiding this comment.
Nice, Looks Good To Me
23ed8b3 to
44c271e
Compare
feat: allow to build using Guix
feat: allow to build using Guix





I added a
mangowc.scmthat allow to build the file using Guix in a reproducible way.This file would be better hosted on a Guix channel (I sent a patch to GNU Guix channel and my personal channel) but I believe it is also nice to have it available directly in the repo.
(I started using it on my personal Guix laptop and it is truely amazing, thank you!).