IRC channel logs
2024-02-04.log
back to list of logs
<lilyp>Weird question: is there a variant of cp that makes n duplicates of an existing file with given names? <lilyp>hmm, maybe I should up my sed game instead <klm`>I think there is something fishy with gcc-cross-avr-toolchain. Is it me, or is make-avr-gcc from avr.scm never used? <klm`>ACTION is going to bed. thanks for all help so far! <Guest16>issues.guix.gnu.org returns a 502 after some time <takev>I know that guix shell automatically loads a guix.scm file, but I am kinda unclear what it does with that. Does it pass any package it finds to shell with a -D flag, or something else? <lilyp>For manifests, no, for guix.scm yes. <lilyp>The idea is that you most likely want to hack on whatever package is described in the current directory. <takev>Does it only expose the inputs and propogated inputs? I am helping a friend out with a package, but the native-inputs do not seem to be in the resulting shell. <ulfvonbelow>it looks to me like it's trying to use a cpp located at /lib/cpp for some unclear reason. Instead of the obvious "it doesn't exist", it's reporting it as a "sanity check failure", because apparently it assumes that it exists <ulfvonbelow>also, IIRC mono wasn't updated in the past because it lacks a bootstrappable build path <ulfvonbelow>despite this cargo is insisting that 1.11.1 is not acceptable <lilyp>ulfvonbelow: I think "^1.11.2" means "1.11.x" for x >= 2 <lilyp>i.e. the package relies on the bug fix introduced in .2 <jmes>Question: In my home configuration I'm using home-xdg-configuration-files-service-type - and normally I give it something like this: `(("git/config" ,(local-file "path/to/conf"))) which works fine. But I wrote some code to process the content of path/to/conf and I want to run it when reconfiguring. I tried both of ,({plain-file,computed-file} "x" (my-proc "path/to/conf")) to get a vague "failed to load" error. <jmes>It's probably because I don't understand gexps very well, any tips? <jmes>context: `my-proc` in this case processes the content of path/to/conf and returns a string, that's why I was using plain-file <jmes>Trying to use plain-file anyway <cbaines>I've also restarted packages.guix.gnu.org <lalebarde>Hi, I need to use an AppImage application in Guix: `pcloud` . I have still not the level to package it in Guix. When I execute it, the shell answers: "No file nor folder of this type". Of course, I did before a `chmod a+x pcloud` . What do I miss? Has some one of you make use of pcloud? <zamfofex>lalebarde: Maybe try using `guix shell -F`. Otherwise, you could try extracting it and using `patchelf`. <evilsetg>Does anyone know a source of how to get bluetooth audio to work? <lalebarde>zamfofex guix have asked me to add "--container". It has created the environment. Now when I run `./pcloud`, I get the error: "./pcloud: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory". So I understand I have to add the package which contains libz.so to the `guix shell -F --container` <lalebarde>Now I have: "dlopen(): error loading libfuse.so.2, AppImages require FUSE to run" <wigust>evilsetg: i use a bluetooth service in the guix system configuration with bluetoothctl utility from terminal <lalebarde>It looks like I have to add `libfuse2` , but it is not in the guix channel. I have tried to add fuse: `guix shell -F --container zlib fuse` but it still needs FUSE <evilsetg>wigust: Hmm, I tried that but it seems that bluetoothctl can't find my bluetooth adapter. But good to know that that should work in principle. <wigust>evilsetg: (bluetooth-service #:auto-enable? #t) in my config, and I think I did a reboot after system reconfigure <lalebarde>zamfofex Good tip thanks, but now it says "fusermount: failed to open /etc/mtab: No such file or directory, fusermount: mount failed: Operation not permitted, Cannot mount AppImage, please check your FUSE setup." <zamfofex>lalebarde: Try using ‘--expose=/etc/mtab’ <ngraves>Hi fellow guixers! I did some work on node packages a few months ago to try and package the zotero server -- not yet done. I've sent a preliminary patch series to simply sort node-xyz.scm alphabetically, and nothing more, in 66180. It's easy to review but such a pain to rebase on the contributor side, I would greatly appreciate if a committer could <lalebarde>zamfofex this solves the `mtab` problem, but I still have "fusermount: mount failed: Operation not permitted" <lalebarde>zamfofex it looks like from other forums that it is a question of ownership of "/dev/fuse". But GNU commands like ls or chown are not available in the environment built by guix shell. <lalebarde>zamfofex I have added `coreutils`, but when I try `[env]$ chmod u+s /usr/bin/fusermount` , it says: "chmod: changing permissions of '/usr/bin/fusermount': Read-only file system" <lalebarde>Even outside the environment, I cannot change permissions of files in /gnu/store <apteryx>is there some place in guix source that can be considered the 'entry point' ? <wigust>apteryx: scripts/guix file can, it's generated during ./bootstrap or ./configure <Guest47>gnome music and photos apps don't show me my files in music and pictures directories. I found this link https://issues.guix.gnu.org/63425 but I can't understand if there's a solution for it on the page. can someone tell me what's going on here? <spiderbit>Hi, what is the easiest way to have a boot command run that changes /proc/acpi/wakeup? <Guest47>this is my first time using guix system <spiderbit>try to use the shepherd config but because it's no real daemon just a setting to change is there a easier better way to do it <spiderbit> (documentation "Setup wakeup to fix S3 resume iussues.") <spiderbit> (list #$(file-append inetutils "/libexec/syslogd") <spiderbit>Guest47 I am not sure if it's merged into "master" / stable <Guest47>spiderbit how do we find out if they were merged or not? <spiderbit>I would assume they would apply it to master <spiderbit>did you look into the git history and search for something like that <spiderbit>well Guest47 that might not be the best way to do it... it would be nice if somebody with more knowledge would answer you. <Guest47>spiderbit yes we'll see if someone comes along <spiderbit>and besides that if somebody has a idea about rofi, the filebrowser doesn't show hidden files this was fixed in master or added a option to activate it, otherwise there is a rofi-file-browser-extended plugin but that needs to be installed on systemlevel apparently some help to get that maybe packaged or cherry pick the newest rofi version would be <ulfvonbelow>is it normal for cargo-build-system to unpack a package inside its own source tree? e.g. foo-1.0.tar.gz unpacks into /tmp/guix-build-foo-1.0.drv-0/foo-1.0, then cargo-build-system extracts foo-1.0.tar.gz into /tmp/guix-build-foo-1.0.drv-0/foo-1.0/guix-vendor/foo-1.0.tar.gz/ ? <apteryx>wigust: thanks! I'm trying to find the best place to call a setup-logger procedure <freakingpenguin>Hey all. I notice when I use guix shell -CW in a shebang (/usr/bin/env -S ...), it fails to add current guix to profile. Anyone encounter this before? Works fine if run outside the shebang. <lalebarde>At this point, I am at this stage to make `pcloud` AppImage work: `guix shell -F --container --expose=/etc/mtab zlib fuse@2 coreutils sudo which` . The last three packages are for debugging and manual tries. I still don't manage to get the right permission: `fusermount: mount failed: Operation not permitted, Cannot mount AppImage, please check your <ieure>I vaguely recall reading about a way to substitute a user-defined package for one in Guix, is that a thing that exists, or am I imagining it? I need to replace xkeyboard-config with one that has a patch which defines more symbols. <ieure>I'd prefer not to recompile everything downstream of that, since it's a lot, but... maybe I have to. <podiki>use --appimage-extract-and-run instead, at least <ieure>Hmm, I guess `guix build --with-graft' is what I want. Is there some way to do that declaratively? <lilyp>ieure: (define your-fixed-package (...)) (define your-package-replacement (package (inherit original) (replacement your-fixed-package))) <lilyp>then swap out original for your-package-replacement with a package-mapping <lilyp>it's definitely one of the most involved tricks <ieure>lilyp, Doesn't the `replacement' have to be on the package *being* replaced, not the one replacing it? <lilyp>no, replacement points to the replacing package <ieure>Okay, I understand what you're saying. And I want to rewrite inputs to depend on your-package-replacement because if I point them at your-fixed-package, that rebuilds, right? <lilyp>We should definitely automate this into a transformation, but haven't yet <ieure>Alright. Thank you for the explanation, it's much appreciated. <spiderbit>Anybody that can help me make that work echo s2 strings in /proc/acpi/wakeup ? <ieure>lilyp, For the package-mapping, am I right in thinking that I need to 1) call package-mapping to get a procedure to manipulate the package 2) map that procedure across all the package in my operating-system? <lilyp>I don't think package-mapping is a lambda generator, but I might be mistaken on that <lilyp>yes, applying this to os-config is pain <ieure>Infodocs say package-rewriting "Return a procedure that, given a package, applies PROC...", so that seems like map-across-package-list to me. <ieure>I think package-input-rewriting is closer to what I need; that also returns a procedure that operates on packages. <lilyp>one of them is recursive, the other isn't, and without looking up the docs, I also confuse them <ieure>There's a #:deep argument for package-input-rewriting which I think makes it apply to everything. <podiki>spiderbit: there's no sysctl equivalent? (since we have a service for sysctl) <spiderbit>another service or a command that does the same? <podiki>spiderbit: i don't know what you are trying to do and am not familiar with acpi stuff <podiki>a quick search says you can make a udev rule as well, maybe that is easier? (just adding a rule with the udev service) <jpoiret>spiderbit: using > for pipe redirections won't work with make-forkexec-constructor as they are a shell feature, but this just forks and execs a process directoly <jpoiret>you should be able to write such a thing completely in guile though, no need to fork+exec (and I bet this would be a one-shot service) <spiderbit>so do I just relapce (service ... #start: (fork... with service [...] (service... <jpoiret>you just replace the forkexec-constructor part with a guile program that writes to /proc/acpi/wakeup. Although if you don't know much about Guile that might be a bit ambitious <jpoiret>otherwise you can definitely do a fork+exec with `bash -c "echo blah > /proc/acpi/wakeup"` <jpoiret>you just have to pass the whole command string "echo blah > /proc/acpi/wakeup" as the third argument though, not split it up! <spiderbit>does it know the path of echo and bash and everything <jpoiret>echo should be a built-in in bash and even sh <jpoiret>you need to use (file-append bash "/bin/sh") instead of that file-append <jpoiret>you needed it before because you weren't running it through a shell, so you needed an actual echo binary, but in sh `echo` is also a built-in, command <spiderbit> "echo XHC0 > /proc/acpi/wakeup; echo XHC1 > /proc/acpi/wakeup;")) <spiderbit>source expression failed to match any pattern <apoorv569>For some reason if I do `guix shell mpd` as an example, I don't have `mpd` available in the shell, as in I can't just type `mpd` and run it, I have to write full path to the store item. <spiderbit>well still get the same source expression failed error <apoorv569>This started happening after I switched to manging my dotfiles using `guix home` instead.. using the various services like `home-environment-variables-service-type`, `home-zsh-service-type` etc.. <apoorv569>Can someone help with this please, I have been dealing with problem for 2-3 weeks now, its causing more trouble than its helpful.. <spiderbit>error: (service (quote (fix-s3-resume)) #:start (make-exec (list (file-append (specification->package "bash") "/bin/bash") "echo XHC0 > /proc/acpi/wakeup"))): source expression failed to match any pattern <ulfvonbelow>ieure: package-mapping and package-input-rewriting are very similar. Both work recursively, and can recurse into implicit inputs as well if #:deep? #t is given. package-input-rewriting is just a special case of package-mapping that replaces packages using fixed constant mappings. The difficulty you're going to run into is finding all the places in your system configuration that can reach xkeyboard-config; package transformations only <ulfvonbelow>apply to packages. Worse still, to my knowledge, every caller of keyboard-layout->console-keymap that currently exists in guix neglects to use the #:xkeyboard-config keyword option, so there isn't even a way to give it an alternate package. <ulfvonbelow>it might be good to add an additional field to <keyboard-layout> to hold the xkeyboard-config used <ulfvonbelow>for now, your best bet might actually be to (set! xkeyboard-config my-xkeyboard-config-with-replacement) at the top of your config.scm <ulfvonbelow>just remember that the arguments, inputs, native-inputs, and propagated-inputs fields are all thunked, so make sure you bind the original xkeyboard-config to some other variable and reference that when defining my-xkeyboard-config-with-replacement <ieure>ulfvonbelow, The problem here is that I have to patch the xkeyboard-config *package* so it has the symbol(s) and rule(s) that go in the keyboard-layout. <ieure>I can't just change the keyboard-layout record, I have to change the package to have the stuff I want to use. <ulfvonbelow>right, and (set! xkeyboard-config ...) should do that. That is, mutate the binding between (@ (gnu packages xorg) xkeyboard-config) and the package it's bound to, so that keyboard-layout->console-keymap is forced to use your package <ieure>I see what you mean. I'd have to recompile everything downstream of xkeyboard-config, though, which is a lot of stuff. <ulfvonbelow>it's far from idiomatic, but it's the best I can think of without modifying guix <ulfvonbelow>just be careful because any reference to xkeyboard-config inside any of those thunked fields is going to refer to what it's bound to at field-read-time, not at package-definition-time <jpoiret>spiderbit: you need "-c" as the second argument of the sh exec, but also this is not a <service> but a <shepherd-service> <ieure>ulfvonbelow, All this is just to get a working Hyper modifier. This isn't just a Guix thing, it's absurdly difficult on all Linux distros. Very annoying. <ieure>(please do not say "use xmodmap" or whatever, that won't work for my usecase) <jpoiret>also, fields of a <shepherd-service> are specified by parentheses like (start #~(whatever should start)) not by keywords like #:start <jpoiret>there are some examples in the manual <spiderbit>we are talking about the systemwide config right? <spiderbit>In procedure service-kind: Wrong type argument: #<<shepherd-service> <spiderbit>uI think it's no "service" but how the hell do I add it then to the config <spiderbit>pff the error messages are so (not) helpfull <spiderbit>how can I add a shepherd service in the system wide config <ulfvonbelow>'service' is a term that gets used in two distinct contexts: a thing that shepherd starts, and a thing that is part of an extension graph in guix <ulfvonbelow>in guix, the former are called shepherd services, the latter are usually just called services <ulfvonbelow>shepherd-root-service-type is a service type in guix, and it can be extended, and the objects it is extended with are instances of shepherd-service-type <spiderbit>so I have to define a shepherd service and then write a "service" for the shepherd service <ulfvonbelow>yes, if it's just a one-off thing to extend shepherd-root-service-type, it would be a good idea to use simple-service <spiderbit>there is just no example... so it's a way to big leap <ulfvonbelow>once you're familiar with the service extension concept, it's pretty straightforward, it's just confusing when you start off by also doing stuff with shepherd services, at which point the names are a bit difficult <spiderbit>so it's not exactly the first time working with it, yet it's still extremely confusing and complicated <ulfvonbelow>you would use simple-service like so: (simple-service 'add-my-extra-shepherd-service shepherd-root-service-type (list MY-SHEPHERD-SERVICE)) <spiderbit>can I directly put a simple-service into (services) <ulfvonbelow>yes, simple-service just creates a one-off service type and then instantiates it <ulfvonbelow>guix's service extension graph can deal with far more general situations than just adding shepherd services. That's why it's not as simple as adding a <shepherd-service> to the services list. <ulfvonbelow>the aforementioned simple-service invocation is a oneliner, just replace MY-SHEPHERD-SERVICE with the <shepherd-service> record of your choice <spiderbit>I get that it's a bit more difficult to define a real service <spiderbit>but just to execute some boot commands it's such a overkill <ulfvonbelow>I don't know how to make it less than one line ¯\_(ツ)_/¯ <spiderbit>ohh you don't need to define the service extra <spiderbit>I thought I need (define myservice ...) and then (simple-service name myservice...) <ulfvonbelow>nope, the second argument of simple-service is the service being extended <ulfvonbelow>btw this is documented in the manual in section 11.18.3 Service Reference <spiderbit> shepherd-root-service-type is not listed in 11.18.3 <ulfvonbelow>simple service is a procedure. It creates a service that extends a specified service using a specified constant value <ulfvonbelow>by calling simple-service with shepherd-root-service-type, we create a service that extends shepherd-root-service-type. <ulfvonbelow>so in short, you use both simple-service and shepherd-root-service-type. <ulfvonbelow>think of simple-service as if it were named "make-simple-service" <spiderbit>(simple-service 'fix-s3-resume shepherd-root-service-type <spiderbit>aber what do I put in instead of the job part <ulfvonbelow>the whole thing that evaluates to a <shepherd-service> instance <ulfvonbelow>by the way, for a shepherd service that only runs once, at boot, I recommend using (one-shot? #t) <ulfvonbelow>ah, right, shepherd-root-service-type is supposed to be extended with a list of shepherd services <spiderbit>ice-9/boot-9.scm:1685:16: In procedure raise-exception: <spiderbit>In procedure struct-vtable: Wrong type argument in position 1 (expecting struct): shepherd-service <spiderbit>In procedure append: Wrong type argument in position 31 (expecting empty list): #<<shepherd-service> documentation: <spiderbit>(simple-service 'fix-s3-resume shepherd-root-service-type <spiderbit>guix system: warning: exception caught while executing 'eval' on service 'root': <ulfvonbelow>well that doesn't sound right. Did you mean 'make-forkexec-constructor'? <spiderbit>I think somebody wrote that maybe as shortcut for the constructor