IRC channel logs

2022-08-25.log

back to list of logs

<Cairn>pkill9: Sorry for the late response. A lot of the libre-supporting laptops cost a little extra.
<Cairn>Purism has those Librem laptops, which are probably some of the most normal laptops that are built to run libre software. They're pretty average devices for the price though, which is kinda what I mean.
<atka>sneek: botsnack
<sneek>:)
<anhj>good morning!
<whereiseveryone>hi
<whereiseveryone>i tried `guix upgrade emacs-eglot --with-commit=emacs-eglot=000b7fdce93ed29c505a7fa75baaf87094fd690a`
<whereiseveryone>but I still have the eglot in packaged in guix upstream
<whereiseveryone>does anyone know what might have happened? bug?
<mange>I'm not sure, but do you get the same result with `guix install emacs-eglot --with-commit=emacs-eglot=000b7fdce93ed29c505a7fa75baaf87094fd690a`?
<pkill9>why did purism succeed so well at the laptop yet fail abysmally with the phone?
<singpolyma>pkill9: I wouldn't say they did so great with the laptops. And the phone's only issue is supply chain stuff, I have mine and it works fine
<PotentialUser-89>whats the best way to copy a file from one location to another using scheme?
<sneek>atka: Greetings!
<Cairn>Wasn't there a command to output a package definition?
<Cairn>I know there's `guix edit` but I thought there was something that just spit out a definition on its own
<Cairn>Ah, I guess `guix archive` is what I was looking for
<PotentialUser-89>figure it out. it's `copy-file`
<apteryx>uh? Makefile:5971: *** mixed implicit and normal rules: deprecated syntax
<apteryx>user error
<lilyp>pkill9: if you don't have the extra bucks to spare and don't care about wifi, I think most laptops with an intel cpu will do
<lilyp>(amd graphics are ☠️)
<abrenon>hi guix
***Dynom_ is now known as Guest6693
<pkill9>i thikk my life will improve if i can hack on guix when outside
***wielaard is now known as mjw
<lilyp>In that case I suppose WiFi is non-negotiable.
<pkill9>is there an equivalent function in guile to the bash "which" command?
<rekado_>not in Guile, but part of Guix: which
<rekado_>in Guile you can use search-path
<pkill9>ah ok
<dgcampea>Should %facebook-host-aliases be moved to "operating-system reference" (https://guix.gnu.org/manual/en/html_node/operating_002dsystem-Reference.html)? It looks misplaced in https://guix.gnu.org/manual/en/html_node/Networking-Services.html
<dgcampea>not to mention, it's also an example on 'hosts-file' usage
<davidl>I need to replace all occurences of / with \/ in a phase for building a package: how can I do that? I thought I could use string-replace-substring from (ice-9 string-fun), but don't how to use that module in the phase.
***califax_ is now known as califax
<tricon>davidl: there's an example here: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/guile-xyz.scm#n846
<tricon>basically, add a new phase and perform your substitutions prior to building.
<tricon>dgcampea: i agree.
<davidl>tricon: that doesn't show me how to do it, actually - I was probably unclear. I need to replace those occurences in a string Variable, not in a file. I will write the string variable to the file afterwards using substitute*. However, I just imported the (ice-9 string-fun) module at the top of the package module, then I could use it inside the build phase via (use-modules (ice-9 string-fun)).
<tricon>davidl: ah!
<Gooberpatrol66>is there an easy way to edit launchers for programs? i try to edit in whiskermenu and i get "read-only filesystem"
<Cairn>Gooberpatrol66: Oh that's interesting. Could you post an example of one of the launchers?
<Cairn>Are they just strings, or are they whole files?
<Gooberpatrol66>so if i edit the kate launcher to "ENV_FOO=test /gnu/store/kpp8c4q1ymg54zpmgijbqkkqx189krq0-kate-20.04.1/bin/kate -b %U" it says "failed to create file "/home/nathan/.guix-profile/share/applications/org.kde.kate.desktop.5VRDR1": Read-only file system."
<pkill9>if you import a guile file with a (define (begin (system ... ))) statement, would it execute the system command when importing? i think it would, but i hav eno time to check
<KarlJoad>pkill9: I would think so, unless you wrap it with a thunk.
<Cairn>Sorry for the late response Gooberpatrol66. Not sure if this is good Guix form, but have you tried using "~/.guix-profile/bin/kate" instead?
<Cairn>Probably won't solve the issue, idk
<VesselWave>Hello! I am still tinkering with rust package definitions. I found a package with build dependency https://docs.rs/generator/0.7.1/generator, but guix manual only covers regular dependencies and dev dependencies. Where should I put it in #:cargo-inputs or #:cargo-development-inputs?
<Gooberpatrol66>Cairn: i can't edit the launcher so i can't change which kate it points to
<Cairn>Ah, my bad
<shcv[m]>any idea why guix shell --search-paths still takes ~4s even though it should be caching the environment?
<shcv[m]>or is it just that slow even with caching?
<pkill9>i think it's kust that slow, atleast for lower specced PCs
<pkill9>just*
<pkill9>but im probably wrong
<apteryx>rekado_: thanks; can't we add the signing key to the config?
<apteryx>is murad hanging around here?
<shcv[m]>sad, I was hoping that the shell command would memoize the results (at least with the search-paths option, which just has to return a string...)
<rekado_>shcv[m]: can you provide a reproducer?
<rekado_>apteryx: we can do that. I just didn’t want to mess with the config and focus on what I set out to do.
<peterpolidoro>do you need to add something to a python package in a guix.scm file to make it install console scripts?
<unmatched-paren>peterpolidoro: no
<peterpolidoro>when I create a guix shell with a guix.scm file the console script is not available as a command
<peterpolidoro>when I do a guix shell with the same python package installed in a channel it is available
<peterpolidoro>I am wondering if there is an error in my guix.scm file
<unmatched-paren>hmm
<peterpolidoro>the console script is listed in setup.cfg
<peterpolidoro>not setup.py
<peterpolidoro>do not know if that matters
<lagash>Swaywm support isn't included in official Guix yet, right? I recall at least one person's dotfiles having packaged it and had a sway desktop service and everything.. trying to remember who though..
<unmatched-paren>there should be absolutely no difference
<unmatched-paren>between `guix.scm` and channels that is
<unmatched-paren>lagash: it's easy to use it
<peterpolidoro>interesting. I will keep playing with it thanks
<unmatched-paren>there's no service needed for sway
<lagash>So which DE has the most Wayland support? GNOME?
<lagash>unmatched-paren: can you give me a config example with Sway?
<unmatched-paren>lagash: https://git.sr.ht/~unmatched-paren/conf
<apteryx>rekado_: ok, but we'll probably forget :-)
<lagash>Hahaha "('s dotfiles"
<rekado_>apteryx: I think we talked about this last time already and did indeed forget
***mark__ is now known as mjw
<atka>sneek: botsnack
<sneek>:)
<peterpolidoro>unmatched-paren I was wrong when I asked my question. I have a python package that installs a console script when I use pip, but does not install the console script when I install it as a guix package
<unmatched-paren>peterpolidoro: Ahh
<peterpolidoro>is there something I can add to my guix package to make it install the console script?
<unmatched-paren>You should be able to add a phase after install
<peterpolidoro>that normally happens automatically?
<unmatched-paren>(add-after 'install 'install-script (lambda _ (install-file "output-dir/script" (string-append #$output "/bin")))
<unmatched-paren>)
<unmatched-paren>so,
<unmatched-paren>in the package record body:
<peterpolidoro>well this is a console_script which is just a function inside of a python file
<peterpolidoro>should I instead make it a script so the whole file can be executed?
<unmatched-paren>peterpolidoro: Hmm, I guess pip creates an appropriate script automatically?
<peterpolidoro>let me check my virtualenv
<peterpolidoro>oh yes it looks like it generates a script file
<peterpolidoro>I guess I should just modify the python package to use a script, not a console script
<peterpolidoro>hopefully that will let guix install it automatically
<peterpolidoro>although that does not seem to be recommend practice according to packaging.python.org
<peterpolidoro>Although setup() supports a scripts keyword for pointing to pre-made scripts to install, the recommended approach to achieve cross-platform compatibility is to use console_scripts entry points (see below).
<peterpolidoro> https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/#scripts
<peterpolidoro>"Use console_script entry points to register your script interfaces. You can then let the toolchain handle the work of turning these interfaces into actual scripts 2. The scripts will be generated during the install of your distribution."
<peterpolidoro>Is that just something that guix does not do? or am I just not setting up my guix package correctly?
***Rampoina is now known as IForgiveSpecing
***IForgiveSpecing is now known as Rampoina
<unmatched-paren>Gahh, flaky interwebs.
<unmatched-paren>peterpolidoro: Sorry for my slow responses :)
<unmatched-paren>peterpolidoro: Interesting about the scripts.
<peterpolidoro>no worries
<unmatched-paren>Maybe we should add support for generating them in Guix directly.
<unmatched-paren>Anyway, for now you could just manually create it in that phase.
<peterpolidoro>I am looking for other guix packages that install the console scripts directly
<peterpolidoro>I do not see any
<unmatched-paren>interesting
<unmatched-paren>maybe they just don't install the scripts at all
<peterpolidoro>I am trying to think of any python functions with command line interface that I can test
<peterpolidoro>there are others that seem to work somehow
<peterpolidoro>maybe if the file containing the console script function is also an executable script then it just happens to work
<peterpolidoro>that would be a nice guix feature though to automatically generate the scripts like pip does
<apteryx>rekado_: one reason I didn't do it myself is that I don't understand why it's necessary on berlin and not say, on my other servers. Is it because of the nginx cache?
<apteryx>shouldn't it implicitly trust its own signing key?
<peterpolidoro>console scripts seem to work when a guix package downloads a python package from pypi
***sneek_ is now known as sneek
***Rampoina is now known as Rampoina1
***Rampoina1 is now known as duioon
<shcv[m]>rekado_: my guix shell invocation is basically `guix shell --search-paths -D <package> -L <local dir containing package>`; could it be the use of -L that makes it recompute the definition each time?
<rekado_>apteryx: on berlin we have a huge cache of substitutes but no matching store items.
<rekado_>these substitutes have been signed.
<rekado_>when using substitutes guix first checks if the signature is authorized
<rekado_>guix doesn’t know (or care) that these substitutes were generated on the same machine
<rekado_>it’s not necessary elsewhere because people generally either just have a thing in the store or not. They don’t generally have a stash of locally built substitutes that doesn’t also correspond to existing store items.