GNU bug report logs -
#77352
[PATCH] home: services: define hyprland home service
Previous Next
Full log
View this message in rfc822 format
Hello Andrew,
thank you for your patches!
On 3/31/25 03:14, Andrew Wong wrote:
> How will you serialize g-expressions? It seems that they are to be added
> to the store as scripts with 'program-file', but I can't figure out how
> to extract the file path from the resulting object; I tried in a REPL,
> program-file objects cannot be used as strings like this function seems
> to suggest, and none of the their properties seem to clearly give their
> location in the store.
As stated in the define-configuration documentation[1], serialization
procedures should return strings or g-expressions; in case of
program-file a g-expression that will ungexp to the script's path will
be returned and the result will be something like:
"exec = /gnu/store/h98yjz6b2rhmxr48c11cy84d3nwf6a7x-exec"
> Also, how are you testing your work? I asked in the IRC channel and they
> suggested spooling up a VM via 'guix system vm' with an operating-system
> definition containing the experimental service, but perhaps you have
> your own method.
This matches my current workflow perfectly. I used to develop this
service directly in my system configuration, but that wasn’t the best
way to test this kind of code. Using a VM is actually pretty
straightforward! If you need anything about that, feel free to ask me.
[1] https://guix.gnu.org/manual/en/html_node/Complex-Configurations.html
This bug report was last modified 167 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.