<bendersteed>I'm working on a racket build system in guix, but I'm kinda new to this so I have a silly question. Where do we add a file for packages to be built by make? I don't see them in Makefile.am
<leoprikler>bendersteed: you probably want to add your source files to the MODULES variable
<bendersteed>i did, but I don't see any reference to gnu packages foo modules
<bendersteed>so I thought there was some other way to include them
<mange>leoprikler: There are some other things that system services do that might not make sense in a user service context. Extending udev, adding users/groups, etc. It's not a simple thing to just say "run this as a user service" unless you're happy to spin up a container where you instantiate those services. That feels like a bad solution to the problem.
<leoprikler>mange: sure, but they don't have to do that. Of course, one would have to programmatically filter such service extensions, but even if we only allowed shepherd-service-type and a few others to be extended by user services, there'd be the benefit of managing all the configuration in the manifest.scm
<leoprikler>(rather than having to manually keep track of shepherd/init.scm)
<alextee[m]>when i run the system reconfigure command, i get a warning that "guix pull was never run", should i ignore this?
<alextee[m]>(i just did guix pull and it finished successfully)
<mange>alextee[m]: If you run "sudo guix reconfigure ..." without having run "sudo guix pull" then it will perform the reconfigure with an out of date guix. You can use "sudo -E guix reconfigure" to use your user's guix version instead (which is up to date after "guix pull").
<reepca>alextee[m]: aye, it's actually really hard to get it right because different systems use different sudo behavior. We had (may still have) a similar confusing warning about "your guix is over a week old, consider running guix pull, etc etc" whenever guix was run with sudo with the same root cause
<mange>Okay, that's good! That's just because we didn't set the GUIX_PROFILE environment variable before sourcing it, which is fine for now.
<mange>You should not be able to install celestia.
<reepca>see section 4.6 Invoking 'guix pull', especially where it says "The result of running 'guix pull' is a "profile" available under '~/.config/guix/current' containing the latest Guix. Thus, make sure to add it to the beginning of your search path..."
<poet>Oh, okay. Is that an oversite on my behalf? I thought I followed the install instructions verbatim...
<reepca>we should probably have this information closer to the install instructions
<mange>Thanks reepca, I was just looking for that. We should really add that to the installation instructions, rather than having it a few sections later.
*reepca thinks most of us are spoiled by guix system
<mange>Also interesting that it just specifies those two environment variables (PATH and INFOPATH), and not sourcing the /etc/profile file within the profile. I'm pretty sure the Guix system only sets the environment variables if it can't find the profile file.
<mange>poet: I don't think anyone can blame you for missing that. The documentation wasn't at all clear. :)
<reepca>brendyyn: where are you getting that error message from? I know there's a limit to how many links a single inode can have, but in that case the daemon is supposed to just not deduplicate that particular file.
<reepca>alextee[m]: most likely a service of alsa-service-type is already in %desktop-services (or %base-services, whichever you're using). You could check the definition in ~/.config/guix/current/share/guile/site/2.2/gnu/services/base.scm or ~/.config/guix/current/share/guile/site/2.2/gnu/services/desktop.scm to make sure.
<mange>If you want to remove a service from the default service lists, you can use "remove". There's an example in the manual a at "(guix) Using the Configuration System".
<alextee[m]>reepca: oh alsa-service-type is in the desktop services, thanks. perhaps the error message could be improved to say something like you included this service twice
<brendyyn>when computer A can offload to computer B, does that mean that A has a backdoor in to B? i.e, full remote access?
<mange>brendyyn: I think A only needs access to the Guix Daemon RPC calls, which aren't full remote access. They can run arbitrary code in an isolated build environment (by sending a derivation to be evaluated), but not necessarily on the host itself.
<mange>There's a pretty high chance I'm wrong about that, though. :)
<alextee[m]>it seems that pulseaudio isn't running on startup. shouldn't it be running by default? do i need to add it somewhere (services?)?
<alextee[m]>running "pulseaudio" on the terminal seems to start it
<alextee[m]>but since the alsa service is supposed to auto route to pulse i would expect it to start pulse by default
<reepca>anyone have news on if I can remove "export ALSA_PLUGIN_DIR=$HOME/.guix-profile/lib/alsa-lib" from my ~/.bashrc yet? I remember it was needed at some point but I don't see any reference to it in the packages now
<alextee[m]>oh actually i don't need a service. i can just add a .desktop entry in ~/.config/autostart
<alextee[m]>great, now my system is set up for pro audio! although i see a lot of the programs i am used to missing from the repositories, hopefully i can help with their packaging
<peanutbutterandc>Can someone please help me figure out why this package definition: https://termbin.com/5b4x is giving me qt is an unbound variable error despite it appearing to be rightly used (with the modules imported)?
<efraim>peanutbutterandc: qt is deprecated, you'll have to use qtbase and then add the other qt modules you need
<reepca>scary part is that it wasn't compiling at the time - just downloading from savannah (which apparently is limited to about 50KiB/s right now, yikes). Makes me wonder what would have happened if I had it compiling, charging from empty, on my bed, without the fan pointed at it...
<efraim>yay for needing to read python sources to figure out CDLL(find_library("pam"))
<fishinthecalcula>Hi Guix! I recentely made a big mistake: I'm dualbooting Debian and the Guix System, one fine day I wasn't paying attention to the apt-get logtrace and it "update-grub"ed under me and now I'm locked out the Guix System. I mounted Guix rootfs to see where the current system is stored in the store and given that I have the store in a separate partition from Guix's rootfs, I tried without luck to handcraft a menuentry for
<reepca>peanutbutterandc: from what I can tell they have a somewhat unusual build system for that project, as instead of the usual top-level invocation of cmake, they want you to run it in one of the two given subdirectories ("slowmoVideo" or "V3D"). So you'll need to replace the cmake-build-system's invocation of cmake (which currently passes "../source") with one that passes "../source/slowmoVideo". Alternatively, you could add a phase after
<reepca>'unpack which chdir's into slowmoVideo (source -> source/slowmoVideo) and assume that there's no existing directory named "build" in source, which is probably a safe assumption.
<zimoun>civodul: Hi! I have seen your comment on SWH.
<zimoun>Does SWH not require metadata about packages?
<peanutbutterandc>reepca, Whoa. I don't really even understand that code. Where can I read up about these (add-after) and all these procedures? I don't remember seeing the packaging section in the reference manual having all this info.....
<brendyyn>peanutbutterandc: its a part of modify-phases
<brendyyn>peanutbutterandc: there is basically a list of phases that do things like configure, make, make install, and these things like add-after let you insert new phases in excactly where they need to be
<peanutbutterandc>Thank you everyone for your help. I am editing the .scm file right now. I am very grateful. One more question: If you were teaching me to fish instead of handing me a fish, what would you recommend a n00b like me go through - step-by-step - to be as proficient as yourselves in guix?
<peanutbutterandc>It doesn't seem trying to go through the reference manual is going to teach me basically everything.
<reepca>get acquainted with grep -R (or M-x rgrep if you use emacs). Seriously, it's super useful.
<roptat>tbh I started contributing to guix when I didn't even know about functional programming. What helped me a lot was finding examples in the existing source base and asking questions :)
<peanutbutterandc>reepca, I do use it already. But just don't have a clue as to what to search for with grep -R
<roptat>right, I wanted to package a few things I was missing. I already had some experience with packaging though, so I knew what I wanted guix to do exactly
<reepca>in this case, if I wasn't sure what modify-phases did, I'd grep through the entire guix source tree looking for it. I'd also probably search for the regexp "define.*modify-phases", which isn't technically guaranteed to get you the definition, but very likely. I'd read whatever comments and documentation were provided.
<roptat>also I found that having the "all in one page" web version of the manual (for guix and guile) was a lot more useful than the info reader for these manuals
<roptat>although it freezes the browser for a little while when loading...
<roptat>although these questions about packaging could be answered in the cookbook now
<roptat>we only have a basic packaging tutorial, but we could cover more parts of the packaging workflow
<peanutbutterandc>roptat, reepca - Any other books that you'd recommend to someone who also happens to be a guile n00b?
<roptat>I only learned by reading a short tutorial on the very basics, then reading the guile manual and guix source code
<roptat>tbh I don't feel very confident about what I write in guile ^^'
<reepca>I can't really speak from experience, since I took the easy road of "interested in lisp for several years before doing anything with guix", and I started with common lisp. An understanding of the simple evaluation rules and the reference manual seems to me to be all you really need though.
<reepca>(and the willingness to dig through code to learn - by example or definition - what it does)
<peanutbutterandc>I got the following error, however: case, if I wasn't sure what modify-phases did, I'd grep through the entire guix source tree looking for it. I'd also probably search for the regexp "define.*modify-phases", which isn't technically guaranteed to get you
<roptat>it says it's not in a directory where "slowmoVideo" exists
<brendyyn>peanutbutterandc: id recommend studying the guix source code. for example id recommend starting by trying to understand guix packaing in depth. for example what is `package'? what does it output, and how does it magically result in a program being compiled. youll want to know what a record-type is and which things are one, which things are just lists etc
<peanutbutterandc>roptat, That probably means I first have to cd through to where it is building. How would I do that? o.O
<brendyyn>learn by packaging some programs your interesting in and getting them working
<roptat>peanutbutterandc, I'd look at the directory structure in /tmp/guix-build-slowmovideo-latest-git.drv-1
<brendyyn>then open up a related module in the guix source code and go through it trying to understand it. youll come along things like `cut', which you can read about in the releveant SRFI. i find this a nice way to learn
<peanutbutterandc>brendyyn, So you'd recommend that instead of reading through books, I learn by poking around, reading code/comments, etc., am I correct? I should probably follow that then. I am probably wasting too much time feeling guilty about not completing the pdfs.
<brendyyn>peanutbutterandc: i think the best way to learn is to find a goal youd like to achieve and begin working towards it. maybe you could dive in to some big task like getting KDE running on guix.
<peanutbutterandc>brendyyn, I see. I would like to work on proper desktop integration on foreign distros though. for eg: GUI apps don't show up in menus with guix, however flatpak ones do. Perhaps I should take a stab at that someday...
<reepca>ah. Okay, so the configure step of cmake-build-system takes care of making the build directory and entering it, but it needs to be initially in the source directory (which in this case is src). So, hopefully one last time, (chdir "src/slowmoVideo") -> (chdir "src")
<brendyyn>peanutbutterandc: thats rather tricky. one issue is with fontconfig which hardcodes a path to find fonts. guix programs will not look at the host systems path, so all fonts have to be installed via guix. maybe you could figure out how to patch it so it works automatically for guix-on-foreign-distro
<peanutbutterandc>reepca, It works thank you. I probably need qt5script module thingy. Another error
<peanutbutterandc>brendyyn, Haha I feel like a high school kid in a meeting with NASA rocket scientists. :D But yes, I would very much like to be able to contribute. I hope to get everyone's guidance here.
<civodul>g_bor[m]: thanks for the RAID things! could you reply to the bug report?
<brendyyn>peanutbutterandc: i was working on distro integration until i ended up switching to Guix System. Guix's nature makes it so it always wants to swallow up your entire system, and trying keep it as a hybrid system will also be inadequate.
<g_bor[m]>civodul: I did that, but it accidentally went to bug-guix.
<peanutbutterandc>brendyyn, I see. Still, it seems that I could supply a few of my friends with the latest (or a certain) version of some of the softwares we use (and they're only comfortable with Linux Mint). So...
<peanutbutterandc>brendyyn, I'm talking about TuxGuitar, to be honest. Which is awesome. Also on flatpak (but guix is cooler). But the guix version didn't give any sound the last time I checked (on a foreign distro)
<reepca>ah, yeah, so field specifiers take a single value. In this case, that single value is a list of keyword-value pairs. So move the #:tests? #f into the same list as #:phases (before #:phases or after the (modify-phases ...) form, but not in between)
<reepca>it should end up looking like (arguments `(#:tests? #f #:phases (modify-phases ...)))
<peanutbutterandc>But if ffmpeg isn't installed (because `input`) to any guix profile, that probably means I have to actually point to the exact one. Which probably means I will have to do (assoc-ref output "ffmpeg"). But that goes more along the substitute route.... I will look around then. Thank you
<alextee[m]>is there a way to make sudo herd schedule mcron refresh? i changed my mcron task and ran sudo guix system reconfigure, but "sudo herd schedule mcron" shows me the old tasks before the change
<g_bor[m]>the python test failure was not deterministic
<Franciman>efraim, i tried your script to import rust packages, but it failed before it started
<alextee[m]>if i understand correctly, the procedure to create and install a new package is: 1. create a package file mypackage.scm, 2. set the GUIX_PACKAGE_PATH to point to the package's directory, 3. guix install mypackage?
<Franciman>alextee[m], you may want to consider using channels
<alextee[m]>how can i specify an openvpn configuration for a client from openvpn configuration files? i can't figure it out from the manual
<alextee[m]>normally you put these under /etc/openvpn/ovpn_udp or tcp it seems
<alextee[m]>i understand that you specify the name of the server in config.scm, but it assumes that openvpn is already configured with the server info
<mange>Are you looking at all the openvpn-client-configuration options in "(guix) VPN Services" in the manual?
<alextee[m]>yeah, i keep glancing over them but i can't seem to figure out where i should put the server info. i would guess openvpn-remote-list, but that only takes a name and a port
<alextee[m]>im new to openvpn though and i might be missing something
<alextee[m]>it would be helpful if there was an example configuration in the manual
<alextee[m]>i have a bunch of .ovpn files i received from my vpn provider
<mange>If you open the .ovpn files, can you make a guess at what sort of configuration you need?
<mange>It might be possible to write a ovpn-file->openvpn-client-configuration procedure, but I don't think anything like that exists in Guix.
<dutchie>I'm not sure of the most "guix-y" way to set up a service, but I believe if you just run "openvpn foo.ovpn" it should work as a foreground service
<alextee[m]>there's certificates and stuff in the ovpn files that i can't tell how to specify to guix. maybe it needs me to create separate files for them and pass the files, idk. i guess i will do the openvpn foo.ovpn thing in my autostart scripts