IRC channel logs
2024-11-24.log
back to list of logs
<x8dcc>Well, it's done. Not even 48 hours of using guix and I submitted a patch. The best font in the world™, too. <marmalade>i have no idea but doing it in this order makes it work for me so maybe there's just something really weird about my system <marmalade>in any case i can finally play with artanis, so i'll take it <x8dcc>A package I am building sets the SUID bit on a binary file. This works fine when I install it manually using `sudo make install`, but doesn't work when installing from the guix package. In fact, there are two chmod commands (one for 755 permissions, and one for u+s) and both seem to be ignored. What might be the cause of this? <x8dcc>(I can send a link to the Makefile and the package definition) <x8dcc>Hamled: Yes, that's helpful. However, I wonder: What if this program was installed in another distro that just uses guix as the package manager? <x8dcc>There is just no way of using that package? <Hamled>well the way that the service works in guix system is it copies the executable in question and sets the necessary bits so you could presumably do that, just manually <Hamled>symlinking might work but I don't know how that interacts with setuid/setgid <x8dcc>I don't think symlinking works in this case, but I am not sure <x8dcc>Either way, question answered <brendn>Does anyone know how to fix the issue with vertico not working with emacs-next-pgtk? <Hamled>brendn: yes, it's apparently caused by the packages not being compiled with emacs-next during the build process (and vertico uses compat.el package which causes it to build using the emacs 29 compat.el) <brendn>Hamled: Thank you, I appreciate the help! That fixes it <podiki>anyone savvy at writing their own home services? i have some simple ones to run some daemons, but wondering if there is an easier way to get environment <podiki>right now i specify it in the shepherd-service in make-forkexec-constructor, but maybe i should be using something else in the context of guix home? <amano>Rutherther: Is submitting your bootloader to guix going to be done soon? <LesikEdelweiss>Hi everyone! Can I get some help with clang on guix? It just doesn't work. When I try to compile simple "Hello, world!" in C++ I get a lot of errors, most of which are 'function-like macro '_GLIBCXX_USE_BUILTIN_TRAIT' is not defined' and 'unknown type name '_GLIBCXX23_CONSTEXPR' '. <LesikEdelweiss>But everything works if I'm doing it through a guix container like "guix shell -C clang-toolchain -- clang++ main.cpp". How do I actually install clang on my main system? <amano>LesikEdelweiss: You have to use guix shell if you want to develop things. <amano>guix shell is the right way to develop things. <amano>You can install clang-toolchain onto your profile, but guix shell is the right way on gnu guix. <LesikEdelweiss>amano: I see, but it seems to be a little inconvenient to spawn a container shell every time I need to compile a program? If it was at least a not-container shell it would be much better <LesikEdelweiss>Also when I try to run "guix shell -C clang-toolchain gcc-toolchain -- clang++ main.cpp" I get the same errors, so I assume it's some conflict between clang and gcc. <amano>An interactive guix shell session can be launched. <amano>Or, you can install clang-toolchain directly on your profile. <amano>And, you don't need a container.... usually. <LesikEdelweiss>Well, when I try to install clang-toolchain on my profile I get a lot of errors, that's why I'm here xD <LesikEdelweiss>But everything works fine if I install only clang-toolchain in a guix shell container <mccd>Heya, what's a quick way to add a sh script to /run/current-system/profile/bin? <amano>LesikEdelweiss: Try guix shell --search-paths clang-toolchain <amano>guix shell configures search paths which are required to use compilers or interpreters. <amano>Without guix shell, the search paths are absent. Lack of search paths lead to compilation errors. <LesikEdelweiss>amano: That command just prints me a bunch of export commands? As far as I understand that's just variables that are inside a guix shell? Well, that didn't help, still the same errors, still working only inside a container shell <Rutherther>amano that is false, search paths are there even for stuff you install, not just for shells <Rutherther>LesikEdelweiss did you source your profile / relogin after installing toolchain? <amano>Rutherther: Are you going to submit your bootloader to guix soon? <amano>Then, I will wait without expectations. <Rutherther>LesikEdelweiss: are you on foreign distro or guix system? if you look into your environment, do you see that you have the search paths that were printed with --search-paths on guix shell? ie. C_INCLUDE_PATH, LIBRARY_PATH, ... <LesikEdelweiss>I really think it's conflicting with GCC in some way, because the only way I can get it working is to remove GCC(by using container) <OriginCode>Does home-dotfiles-service-type support the `--dotfiles` argument of stow? <Rutherther>LesikEdelweiss: right, if you have gcc toolchain, some stuff won't work along with both. That's an issue with conflicting header/library files, it's probably unfixable bug as long as guix uses search paths for toolchains instead of coding the toolchain library paths into the toolchains like some other stuff does <LesikEdelweiss>Rutherther: So I'll have to keep using shell containers I guess? <amano>So, you can't just compile packages that are compiled by clang-toolchain? <amano>I just wonder how other linux distributions handle all the things. <Rutherther>amano: this is conflicting files between the toolchain libraries themselves. How it's handled usually is by not using search paths for those, but by hardcoding the include paths and library paths directly into gcc/clang. <Rutherther>amano: try looking at "echo | gcc -E -Wp,-v -" output for guix gcc-toolchain and for other distro's. When you unset C_INCLUDE_PATH. For guix one, you will see only some basic headers coming from gcc, whereas for other distros it will point to folders with glibc. Guix points to glibc only by having it in C_INCLUDE_PATH <Rutherther>amano: I think it's best observable with nix, where the paths are going to nix store, if you have nix, try "nix-shell -p", and the command I sent with gcc. You will see glibc include path in there, even though C_INCLUDE_PATH is unset. With "guix build gcc-toolchain" and executing the bin/gcc under the path it tells you the package is at, you won't see glibc, you will see it only if you entered into a shell that will give you C_INCLUDE_PATH <janneke>do we have a way to fix/set GUIX_LOCPATH on foreign distros yet, when using guix-home? <amano>Rutherther: So, the issue won't bother me when I install source packages compiled by clang-toolchain? <Rutherther>amano: no, not at all, the toolchain is just a build input, it's not exposed to your profile <Rutherther>amano: and guix builds in isolated containers, so your profile has no effect on the compilation <pjals>How do I get logs from home services like Pipewire? I can't find it in ~/.config/shepherd nor /var/log/messages. <Rutherther>pjals: user state resides under "~/.local/state", for shepherd the log is at "~/.local/state/log/shepherd.log" <amano>pjals: I guess you will have to write your own home service.... <pjals>Thanks! Now that I know why Pipewire is crashing: How does Guix set the LADSPA plugin path for Pipewire? <Rutherther>pjals: I am not completely sure, but it seems like there is ladspa service type that sets LADSPA_PATH, have you tried adding that one to your system config? ... I suppose it's a system service because it's for pulseaudio, so for pipewire, if the mechanism is the same, it might be possible to make a similar home service <pjals>I'm close to frankensteining the LADSPA service to work for guix home, but I can't seem to figure out how to ungexp a file-append for use in the home-environment-variables service. <Rutherther>pjals: doesn't leaving in just the file-append work, without trying to ungexp it? <pjals>Rutherther: No, because it's used as an input to string-join to construct the combined environment value, but trying to gexp the entire string-join just complains that a procedure in the same module is not available. <janneke>ah, on a foreign distro, just add glibc to your profile <rekado>huh, I didn't know there's a ladspa service type. <rekado>I wonder when I'd use that instead of just having my plugins in my home profile <attila_lendvai>so, git send-email branch commit3-hash..commit4-hash tries to send commit 1 and 2... any pointers on how to send non-head commits from a branch? <Rutherther>rekado: so you just installed the plugins by putting them to packages of home environment, and it works? <Rutherther>attila_lendvai: should be just "git send-email one-hash..second-hash", without specifying branch <attila_lendvai>Rutherther, that only picked one commit, but it works if i go one more down (treat the range end as non-inclusive). thanks! <pjals>Rutherther: I tried just dumping them in the profile, it didn't work <Rutherther>attila_lendvai: right, you need to put in ..= if you want to include the last one <x8dcc>Indenting guix .scm files in Emacs is pretty inconsistent in my machine. Sometimes it uses two spaces, and sometimes one. Does this happen to anyone else? For example: https://bpa.st/VW2A <rekado>Rutherther: yes. I set the LADSPA_PATH in my init files. <Rutherther>rekado: oh, alright... so you do not just install them via packages, but also set it, that's what I was asking for. <x8dcc>Does anyone know where I can find the "autoreconf" package? "guix locate" only shows bash-completion <x8dcc>Hmm... The upstream version of the manual says I should use "setuid-programs", but the devel version says I should use "privileged-programs" <x8dcc>I tried "setuid-programs" and it worked fine, but I rather use the newer version if it's stable. What should I use? <Rutherther>x8dcc: always follow devel version of manual, it's the one for newest guix. the non-devel one is for relase that shouldn't be used for anythng except the initial installation <x8dcc>And the devel version is guaranteed to be stable? <x8dcc>Right, I guess I don't even know what I mean by "stable" <m1sha>Is there there a straightforward/standard way to do a custom build of a package? I want to pull emacs from git and then build it with custom build flags and then have it otherwise behave as if it were normal system emacs. This may well be somewhere in the docs but I haven't managed to find it. <x8dcc>m1sha: I am very new to guix myself, but I created a channel for some of my packages/forks and it wasn't too hard (specially because of the help I got here). <Rutherther>m1sha: sure. For some modifications you can use transformations, there is with-configure-flags that could help here (it appends flags). If you want something more complicated, then just declare a package that will inherit emacs, and override arguments. You will probably want something like substitute-keyword-arguments to modify the original ones <m1sha>x8dcc Rutherther thanks, do either of you have a lank to an example I could look at? <x8dcc>m1sha: I can send the channel I wrote, and some manual links, but you should probably listen to Rutherther because I don't know how to "use transformations" or "inherit from emacs" :) <m1sha>x8dcc fair point! Thanks for the link. I'm (clearly) pretty new too but I am keen to learn the right way to do things. <Rutherther>m1sha: you can search through guix channel for inheriting and substituting arguments. As for transformations, it has a section in manual <x8dcc>m1sha: One more thing, as ieure (sorry for ping) told me, it's a good idea to look at the source of some official (or unofficial) packages. Try cloning https://git.savannah.gnu.org/git/guix.git and looking inside "gnu/packages/*.scm", for example <x8dcc>They are easy to read if you know some lisp, and you will find many different ways of doing things <x8dcc>They are easy to read even if you don't know lisp, anyway <m1sha>Great! I do know some lisp, but not Guile specifically. Cheers for all the help, I'm off to dive into the docs and the package definitions then. <futurile>four backslashes to get an escaped backslash <shudder> <x8dcc>Like most programming languages that use '\' for escaping <x8dcc>Does anyone here use Emacs' org-mode for his literate guix configuration? I think it's not a bad idea, but I would like to see some examples first <podiki>i have other files as literate configs via org-mode, but haven't moved my system config there yet <x8dcc>Oh, I know that guy, he makes nice videos. That config looks good for reference, thanks! <podiki>yup, daviwil is often around too <podiki>though from the top of that repo says has moved to guix home for all of that <podiki>i'm also putting more in guix home but will still try to make everything from just one org file (or a few files), just haven't done it yet <podiki>nice! yeah we should have a recommended config list for people to see <podiki>yup, i haven't used that before but likely for pieces within scheme code it is handy or else dealing with parens would become annoying i imagine <x8dcc>Yeah. My first thought was defining symbols for the different parts of my 'operating-system' block, and then joining them in the actual (operating system ...) body. I rather use this noweb syntax <podiki>symbols is easy enough too since operating-system is a record (if i remember), so each piece kind of stands along, like (services my-services) where (define my-services ...) is earlier <x8dcc>Still, I rather have each service (or group of services) in its own Org code block, so I can add an explanation. With Emacs, this has been a life saver. Just finding some obscure setting from months ago and having a link of where I found about it <x8dcc>And I wanted to do this with guix from the start, since moving a bigger config to Org is more tedious <marmalade>Rutherther: Hey sorry for being salty the other day. I appreciate all your help! <Rutherther>marmalade: salty? I haven't noticed, or forgot already :). Happy to help <anemofilia>I am testing the first release candidate for shepherd, but haven't managed to run a single timer succesfully so far, I tried using simple commands as the timer action, tried using lambdas, tried a single string... <anemofilia>Looking into /var/log/messages, it seem to be ready to run and then... does nothing <x8dcc>Does anyone know why my bash-completion only works in TTYs? Doesn't work on my terminal emulator (inside Xorg), even though it uses bash. I even tried moving the "bash-completion" package from my system config to my home config, but nothing <yelninei>anemofilia: i have it running as a user service: I just did a 'herd schedule timer at TIME touch foo' and when it ran i had the file in my home folder <anemofilia>I was trying to load it with `sudo herd load root FILE` and then trigging it <yelninei>anemofilia : there are some more examples in the shepherd manual <wakyct>hi all newbie question, what is an efficient way to find what package provides a lib, for example if I'm gathering dependencies for a project that doesn't have a guix package <wakyct>for example the project lists a dep as libfreetype6-dev (on Ubuntu) <wakyct>and a simple guix search doesn't list anything for libfreetype6 <x8dcc>wakyct: There is a "freetype" package, not sure if it's equivalent to that Ubuntu package <wakyct>yes I saw, I wonder is there a general naming pattern? <Rutherther>wakyct: there is guix locate. But it will work only for stuff you already have in the store. for other stuff there is unfortunately no way to know for sure. As for general recommendation, I think it makes sense to try to search with as little info as possible, ie. the 6 in your search is excessive, even if there were multiple versions, you could filter them afterwards. <wakyct>like lib<x> on Guix is just '<x>'? <x8dcc>wakyct: No, lib<x> is not usually just <x>. Most libs (that I use) start with lib<x> <anemofilia>yelninei: Yeah, I read the manual... Idk why the ways I did before didn't work <anemofilia>The `herd schedule timer at TIME` thing works fine though <graywolf>Hi, quick question, would anyone know how to create an executable shell script in Guix? There is (program-file), but that is for a guile scripts. Is there an alternative for shell scripts? <Rutherther>graywolf: as far as I know, there is not a function for that. But it's still fairly simple to do. You can use program-file, and the program file will do set-path-environment-variable on PATH so that the script gets what it needs. Then you invoke sh / bash, and give it the script you have via local-file <anemofilia>Hm, still messing with timers here, and I managed to do some sutff with `herd schedule timer at ...`, so ok, timers work at least partially <anemofilia>But these timers aren't quite what I want, since they are transient <anemofilia>I'm honestly more testing it for interest than by necessity, if it matters <anemofilia>But what I wanted to achieve is to snapshot my @home btrfs subvolume each 15 days putting the snapshot in @snapshot/home/%Y-%m-%d/ <anemofilia>I guess it would be a fair use of timers (and I do know I could achive it using mcron-service-type) <anemofilia>thing is, with the non-transient timers, I couldn't even touch a file <x8dcc>I still haven't fixed that bash-completion issue from before. I have no clue what's causing it. What lines related to guix do I need to put in my .bashrc and .bash_profile, exactly? Does the manual mention this? <lechner>Hi, how may I use a local source tree in guix.scm, please? <graywolf>lechner: Hi :) What do you mean exactly? <graywolf>You want for example to build a package from local git repository? <lechner>graywolf Hi! Actually, I think I can use local-file, except it requires an absolute path? <graywolf>I think the first example in "Level 1: Building with Guix" could be what you want? <lechner>graywolf / Yes, thank you! That looks great, but why do we need the 'or' expression in vcs-file?, please? <lechner>i guess if we not in a Git checkout (just like it says)