Re: Newbie user question: What do the columns shown by "guix package -I" mean?

2023-02-26 Thread Tobias Geerinckx-Rice

Rodrigo Morales 写道:

Thanks! That's what I was looking for.


I'm glad to hear it!

A related question: I didn't understand the part "retain 
backwards compatibility with isatty/stderr/etc."


First of all: I worded this poorly, as is my wont.  I should have 
said ‘by using’ instead of ‘with’.  We're not trying to be 
compatible with isatty or stderr…


Wat I meant was Guix could use the ‘isatty’ Guile procedure to 
show decorate the columns only when the output is a TTY 
(‘interactive’), or print a header line to ‘stderr’ so it won't be 
captured by a pipe.


I think that any such solution would be fragile, do the wrong 
thing in at least one case, and add too much complexity just to 
sometimes add a header.


Why not simply always add a header?

Someone might be using ‘guix package -I’ in a script, and parsing 
its output.  In fact I guarantee you that several people are doing 
so behind closed doors right now!  Adding a header would break 
such scripts.


I, personally, would welcome breaking their scripts—in exchange 
for adding a ‘--format=’ option like 
we already do for ‘guix search’.  A real API that's actually 
reliable and supportable.  I think that's fair.


I just think I'd be outvoted and don't feel like starting a fight 
:-)


Kind regards,

T G-R


signature.asc
Description: PGP signature


Re: Newbie user question: How to delete all files in /gnu/store related to a package definition?

2023-02-26 Thread Julien Lepiller
Hi Rodrigo,

>   ,
>   | finding garbage collector roots...
>   | guix gc: error: cannot delete path
> `/gnu/store/2j9gykgj0axgg193pd6hvrmnzqbz88nm-font-noto-color-emoji-2.034.drv'
> since it is still alive
>   | Exit code: 123
>   `

As it says, that store path is still alive, but why?

When you install a package, remove a package, or do anything in your
user profile, guix will create a new "generation" of the profile that
contains the same items as the previous generation, except for what you
asked it to do. So when removing a package with `guix remove foo`, you
cerate a new generation of the profile, where package "foo" is not
present.

Old generations of your profile are considered live, and are protected
against garbage collection, so you can roll back to them easily in case
something goes wrong with the new generation.

Try this:

guix package --roll-back

Now, you should be able to use your font again!

You can list the generations with

guix package --list-generations

and go back to the most recent one with

guix package --switch-generation= where  is the generation number
given in the previous command.

You can also remove old generations of your profile, for instance, all
but the current one:

guix package --delete-generations

and then, you should be able to collect that store path :)

HTH!



Re: Newbie user question: What do the columns shown by "guix package -I" mean?

2023-02-26 Thread Rodrigo Morales
Thanks! That's what I was looking for.

A related question: I didn't understand the part "retain backwards
compatibility with isatty/stderr/etc." and I'm curious about that. I
suppose that you mean that "guix package -I" doesn't show the column names
to maintain backward compatibility with isatty, stderr, etc., but it's not
clear to me what problem would arise if column names were shown.

On Sun, Feb 26, 2023 at 3:03 PM Tobias Geerinckx-Rice  wrote:

> Hi Rodrigo,
>
> Rodrigo Morales 写道:
> > Inexperienced GUIX user here. I have a question. What's the
> > formal names
> > for the information presented in the columns shown by `guix
> > package -I'?
> > (see example of output below)
>
> I answered this question on IRC as well, so I'll just be lazy &
> paste my answer here:
>
>   rdrg109_: That's a good question! The columns are
>   documented in the manual (‘info guix’, ‘Invoking guix package’ —
>   or
>   <
> https://guix.gnu.org/en/manual/devel/en/html_node/Invoking-guix-package.html#Invoking-guix-package>)
>
>   under ‘--list-installed’. But it's not documented by the command
>   itself. Doing so now is probably not a good idea, even if we try
>   to be clever and retain backwards compatibility with
>   isatty/stderr/etc.
>   — https://logs.guix.gnu.org/guix/2023-02-26.log#205255
>
> Kind regards,
>
> T G-R
>


Re: Problems with Gnome Authenticator 2FA

2023-02-26 Thread Gary Johnson
Wojtek Kosior  writes:

> I recall keepassxc, beside being a password manager (and one I am
> satisfied with), can also generate authentication codes :)
>
> guix show keepassxc

Thanks, Wojtek! I was able to use keepassxc to create a TOTP code for
Gitlab 2FA.

I wonder if anyone is planning on fixing the broken GNOME Authenticator
package though?

Cheers,
  Gary

-- 
GPG Key ID: C4FBEDBD
Use `gpg --search-keys trac...@disroot.org' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Newbie user question: How to delete all files in /gnu/store related to a package definition?

2023-02-26 Thread Rodrigo Morales
Table of Contents
_

1. The context
2. The question


1 The context
=

  Inexperienced user here. I'm currently learning how to define my own
  packages. I'm using the following package definition to install a
  font.

  ,
  | (define-module (fonts)
  |   #:use-module (guix packages)
  |   #:use-module (guix git-download)
  |   #:use-module (guix gexp)
  |   #:use-module (guix build-system trivial)
  |   #:use-module ((guix licenses) #:prefix license:))
  |
  | (define-public font-noto-color-emoji
  |   (package
  | (name "font-noto-color-emoji")
  | (version "2.034")
  | (source (origin
  |   (method git-fetch)
  |   (uri (git-reference
  | (url "https://github.com/googlefonts/noto-emoji;)
  | (commit (string-append "v" version
  |   (file-name (git-file-name name version))
  |   (sha256
  |(base32
  |
"1d6zzk0ii43iqfnjbldwp8sasyx99lbjp1nfgqjla7ixld6yp98l"
  | (build-system trivial-build-system)
  | (arguments
  |  (list
  |   #:modules `((guix build utils))
  |   #:builder
  |   #~(begin
  |   (use-modules (guix build utils))
  |   (let* ((out #$output)
  |  (font-dir (string-append out "/share/fonts"))
  |  (truetype-dir (string-append font-dir "/truetype")))
  | (chdir (assoc-ref %build-inputs "source"))
  | (install-file "fonts/NotoColorEmoji.ttf" truetype-dir)
  | (home-page "https://github.com/googlefonts/noto-emoji;)
  | (synopsis "Noto Color Emoji fonts")
  | (description "Noto Color Emoji fonts.")
  | (license license:silofl1.1)))
  `

  I installed that package without no problems.

  ,
  | guix package -i font-noto-color-emoji
  | echo Exit code: $?
  `

  ,
  | The following package will be installed:
  |font-noto-color-emoji 2.034
  |
  | The following derivation will be built:
  |   /gnu/store/63y5vvvkmr48cmc17kv6d14miia22z9z-profile.drv
  |
  | building CA certificate bundle...
  | listing Emacs sub-directories...
  | building fonts directory...
  | generating GdkPixbuf loaders cache...
  | generating GLib schema cache...
  | creating GTK+ icon theme cache...
  | building cache files for GTK+ input methods...
  | building directory of Info manuals...
  | building XDG desktop file cache...
  | building XDG MIME database...
  | building profile with 24 packages...
  | hint: Consider setting the necessary environment variables by running:
  |
  |  GUIX_PROFILE="/home/rdrg/.guix-profile"
  |  . "$GUIX_PROFILE/etc/profile"
  |
  | Alternately, see `guix package --search-paths -p
"/home/rdrg/.guix-profile"'.
  | Exit code: 0
  `

  I could check that the package was installed by executing the
  following command.

  ,
  | guix package -I font-noto-color-emoji
  `

  ,
  | font-noto-color-emoji 2.034 out
/gnu/store/b1myag5hg13qs0n3p3l0av2b2v96czi6-font-noto-color-emoji-2.034
  `

  I deleted the package.

  ,
  | guix package -r font-noto-color-emoji
  | echo Exit code: $?
  `

  ,
  |
  | The following package will be removed:
  |font-noto-color-emoji 2.034
  |
  | hint: Consider setting the necessary environment variables by running:
  |
  |  GUIX_PROFILE="/home/rdrg/.guix-profile"
  |  . "$GUIX_PROFILE/etc/profile"
  |
  | Alternately, see `guix package --search-paths -p
"/home/rdrg/.guix-profile"'.
  |
  | Exit code: 0
  `

  Now, because I've been experimenting with the definition of that
  package, there are multiple files that have been created in
  `/gnu/store'. See output of the command below.

  ,
  | find /gnu/store -mindepth 1 -maxdepth 1 -name '*font-noto-color-emoji*'
  `

  ,
  |
/gnu/store/3m3ifwx0klp2kphx1rmc5qq3z940xbkn-font-noto-color-emoji-2.034.lock
  |
/gnu/store/z085zkl49g4pxmd0f7m5izlmlf7429ac-font-noto-color-emoji-2.034-checkout.drv
  |
/gnu/store/bvc3bfvdblsz6k28m3d1h16ccgv31r3k-font-noto-color-emoji-2.034-builder
  |
/gnu/store/xjrsfz1ca4zphxivmsmz7z7j2xswrrgs-font-noto-color-emoji-2.034.drv
  |
/gnu/store/nbp1bp6pabdl0lqd20bxpwalgcpn4dyn-font-noto-color-emoji-2.034-builder
  |
/gnu/store/rram8vs20f0g6zmvli19lrrkh0wrrz5z-font-noto-color-emoji-2.034.drv
  |
/gnu/store/zka3h8gmvqi9rs16av5xq5b5128kr2v9-font-noto-color-emoji-2.034-builder
  |
/gnu/store/7wgb6vhhwdlx3pwaqvvmvha3vkxsj5kl-font-noto-color-emoji-2.034.drv
  |
/gnu/store/qxjr48bb5qzh8v16xk94yphyb0ppmxlg-font-noto-color-emoji-2.034-builder
  |
/gnu/store/pks5k3gnacyqikb1828qmjks8pb6yvql-font-noto-color-emoji-2.034.drv
  |
/gnu/store/zi928lwkgijciyxd9l68k215hd1z5j7p-font-noto-color-emoji-2.034-builder
  |
/gnu/store/7wk18cpyy7bpi7v04xi2ygavdlf6rg24-font-noto-color-emoji-2.034.drv
  |
/gnu/store/4pjz6gl2aj1sl6zyq8pgxyk9fwf8j9h2-font-noto-color-emoji-2.034-builder
  |
/gnu/store/2j9gykgj0axgg193pd6hvrmnzqbz88nm-font-noto-color-emoji-2.034.drv
  |

Re: Newbie user question: What do the columns shown by "guix package -I" mean?

2023-02-26 Thread Tobias Geerinckx-Rice

Hi Rodrigo,

Rodrigo Morales 写道:
Inexperienced GUIX user here. I have a question. What's the 
formal names
for the information presented in the columns shown by `guix 
package -I'?

(see example of output below)


I answered this question on IRC as well, so I'll just be lazy & 
paste my answer here:


 rdrg109_: That's a good question! The columns are 
 documented in the manual (‘info guix’, ‘Invoking guix package’ — 
 or 
 ) 
 under ‘--list-installed’. But it's not documented by the command 
 itself. Doing so now is probably not a good idea, even if we try 
 to be clever and retain backwards compatibility with 
 isatty/stderr/etc.

 — https://logs.guix.gnu.org/guix/2023-02-26.log#205255

Kind regards,

T G-R


signature.asc
Description: PGP signature


Newbie user question: What do the columns shown by "guix package -I" mean?

2023-02-26 Thread Rodrigo Morales
Inexperienced GUIX user here. I have a question. What's the formal names
for the information presented in the columns shown by `guix package -I'?
(see example of output below)

As I'm learning how to use Guix, I'm taking notes so I want to make sure
that I'm using the correct names in my notes. By intuition, I can say
that the first column is the package name, the second column is the
package version. What about the 3rd and the 4th column?

,
| guix package -I
`

,
| rsync   3.2.7   out
/gnu/store/72isv0hc8wp65bajhdh8jqvd3m9w0p4x-rsync-3.2.7
| tmux3.3aout
/gnu/store/ynvhs65sh4nq5rd6b1pnlh2h7d94jk1c-tmux-3.3a
`


Re: Examples of local-host-entries or hosts-service-type?

2023-02-26 Thread Sergiu Ivanov
Hi Gary,

Gary Johnson  [2023-02-21T16:33:25+0100]:
> 2023/02/10 23:40, Sergiu Ivanov:
>>
>> Could someone point me to an example of how I should update
>> my configuration?
>
>   I just went through this exercise myself, and I decided to keep my
> extra /etc/hosts entries in a separate text file using the original
> hosts format. This makes them much easier for me to read and edit. To
> provide them to the `hosts-service-type` service, I went ahead and wrote
> a little importer function in Scheme that I thought some other folks
> might benefit from.

Wow, thanks a lot for sharing!  You even handle comments :clap:

I admit that I literally have 2 entries to add to my /etc/hosts, so
I will still go with the manual addition as suggested by Bruno and
Remco, but I will keep your solution in mind!

> Also, please note that the Guix info pages are incorrect for
> `hosts-service-type` and `host`. The docs say they are exported by `(gnu
> services)`, but they are actually located in `(gnu services base)`.

Yeah, people seem to be actively working on this particular part of Guix
at the moment, including the docs.  I guess stuff will get fixed soon.

-
Sergiu



Re: Examples of local-host-entries or hosts-service-type?

2023-02-26 Thread Sergiu Ivanov
Hi Bruno and Remco,

Thank you for your messages and sorry for the delay with the answer.


Bruno Victal  [2023-02-21T17:45:09+0100]:
> Hi Remco,
>
> On 2023-02-11 11:46, Remco van 't Veer wrote:
>>(hosts-service-type config =>
>>(cons* (host "some.ip.address.1" "machine1")
>>   (host "some.other.ip.address" "machine2")
>>   (local-host-entries host-name)
>
> This is not the "right" way to do use the service, the proper way is to 
> extend this service
> (as described in the manual) by:
>
> (simple-service 'add-extra-hosts
> hosts-service-type
> (list (host "192.0.2.1" "example.com"
> '("example.net" "example.org"))
>   (host "2001:db8::1" "example.com"
> '("example.net" "example.org"

Thanks a lot!  I added this to my services in operating-system and it
worked flawlessly.

> You only override the hosts-service-type value when you don't want to have
> 'localhost' as an alias of your _hostname_ or you don't want to set 
> '127.0.0.1' / '::1'
> as IPs for localhost / _hostname_.

Oh, good to know that!

>> local-host-entries
>
> This procedure is for internal guix use, it isn't really meant to be used 
> outside.
> In fact, I think it shouldn't be exported at all since it's only use is to 
> set the default value of
> hosts-service-type.

I have just done a guix pull and the new version of Guix does not
recognize local-host-entries any more. Apparently someone has removed
the export, as you suggested.

In terms of the docs, I don't find the entry for hosts-service-type here
any more:

https://guix.gnu.org/manual/en/manual/devel/en/html_node/Service-Reference.html

even though this is where I found the information about
hosts-service-type last week, and a cached version of the page still
shows this entry.

I guess Guix People are working on the subject at the moment, so I will
contain my zeal to update the documentation a little bit :D

-
Sergiu



Re: attempt to scan in Guix

2023-02-26 Thread Gottfried

Hi,

thank you very much. It was the right command.


scanimage -L


but it didn’t find a scanner:

No scanners were identified

---

with sudo it found my printer/scanner


sudo scanimage -L
Passwort: 
device `hpaio:/usb/Officejet_J4500_series?serial=CN92G561F4052T' is a Hewlett-Packard Officejet_J4500_series all-in-one





"sudo sane-find-scanner"


 # No SCSI scanners found. If you expected something different, make sure that
  # you have loaded a kernel SCSI driver for your SCSI adapter.



found USB scanner (vendor=0x03f0 [HP], product=0x2a12 [Officejet J4500 series]) 
at libusb:003:006
could not fetch string descriptor: Pipe error
could not fetch string descriptor: Pipe error
  # Your USB scanner was (probably) detected. It may or may not be supported by
  # SANE. Try scanimage -L and read the backend's manpage.
  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports
  # can't be detected by this program.



it found a usb scanner, but could not fetch string descriptor.

1.
does this message say that proprietary software is the problem?

---

Please read the documentation
which came with this software (README, FAQ, manpages).


2.
Can I read documentation with the terminal, having no documentation on 
paper? Which commands I have to use?



-
Kind regards

Gottfried



Am 26.02.23 um 15:16 schrieb Felix Lechner:

Hi Gottfried,

On Sat, Feb 25, 2023 at 1:41 AM Gottfried  wrote:


How would be the command to use libsane directly in the terminal?


I think the command to list the detected scanners is 'scanimage -L'
but my memory isn't perfect. It would be best to consult the
documentation.

Kind regards
Felix Lechner


--




OpenPGP_0x61FAF349C9FB7F94.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


Re: attempt to scan in Guix

2023-02-26 Thread Felix Lechner via
Hi Gottfried,

On Sat, Feb 25, 2023 at 1:41 AM Gottfried  wrote:
>
> How would be the command to use libsane directly in the terminal?

I think the command to list the detected scanners is 'scanimage -L'
but my memory isn't perfect. It would be best to consult the
documentation.

Kind regards
Felix Lechner



Re: Coreboot,T440P & GUIX installer

2023-02-26 Thread Wil deBeest


22 Feb 2023 18:35:03 jerome moliere :

> Hi all,
> I just bought a refurbished machine (T440P) with Coreboot to run a fully
> open source experience...
> Experience is not so good for the moment, because I am stuck in the third
> or fourth screen of the GUIX installer during network detection.
> My laptop has an atheros wifi  chipset  supported for a long time by the
> Linux kernel (no proprietary firmware)... This wifi chipset is recognized
> but activating it fails during ESSID pairing (bad password)...
> T440P has an ethernet connector, ethernet card is recognized too , the card
> works on console during installation (ip a shows correct information, ping
> works nicely inside my LAN or for public domains)  but network step finish
> with RED screen saying my network is unable to provide access to
> substitutes  (git repos for GUIX ?) while github is resolved in console...
> 
> I have tried to restart the network services, to play with conmanctl to
> restart services, rescan... But it always fails!!!
> 
> I wondered if someone runs Coreboot with GUIX ? The machine is quite old so
> all hardware is recognized, wifi chipset is compliant with free software,
> so it should work nicely ..And I can't think that installer has a so big
> bug (it should prevent many people from installing Guix)..
> 
> I have tried the 1.4 iso & the system crafter latest build but same
> result...
> 
> Have you any idea...
> thanks for sharing
> 
> 
> -- 
> J.MOLIERE - Mentor/J
Hi Jérôme,

I am running Guix on a Lenovo X220 tablet with osboot (osboot.org).  I don't 
know how to help you, but if you have an idea or if you need me to check 
something, I can try and do that.


Cheers
Wil



Re: Problems with Gnome Authenticator 2FA

2023-02-26 Thread Eugen Stan

On 23.02.2023 01:00, Wojtek Kosior via wrote:

guix show keepassxc


Hi,

keepassxc is quite nice.
I am using the Debian version, not the guix version.

Most services supporting TOTP conforming with RFC also have a plain text 
2FA setup code (besides the normal QR setup code) .


keepassxc also has a browser extension named keepassxc-browser 
https://github.com/keepassxreboot/keepassxc-browser .


It does not seem to be packaged in guix.


Good luck,
--
Eugen Stan
begin:vcard
fn:Eugen Stan
n:Stan;Eugen
email;internet:eugen.s...@netdava.com
tel;cell:+40720898747
x-mozilla-html:FALSE
url:https://www.netdava.com
version:2.1
end:vcard



Re: limited compiler-rt support in llvm-15?

2023-02-26 Thread Efraim Flashner
On Tue, Feb 21, 2023 at 12:22:55AM +, Haugen, Kjetil via wrote:
> [AMD Official Use Only - General]
> 
> Hello!
> 
> I'm in the process creating guix packages for rocm using upstream clang. I 
> noticed that for clang-runtime-15, guix now explicitly deletes all static 
> libraries which makes the packages with -rtlib=compiler-rt fail due to 
> missing libclang_rt.builtins-x86_64.a. Is there any particular reason why 
> guix made that change between clang-runtime-14 and clang-runtime-15? I'd like 
> to propose to revert that change. I know I can always create my own 
> clang-runtime-15 variant, but I was hoping to avoid the additional complexity 
> of maintaining custom versions of clang-runtime and all the packages that 
> depend on it.
> 
> Thanks,
> KJ

I looked through the git history and I didn't see anything obvious about
why they were deleted. I assume it was to save space.  If it does break
linking like that then I don't see a reason why it couldn't be changed.

-- 
Efraim Flashner  אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted


signature.asc
Description: PGP signature


Re: package store directory in custom location

2023-02-26 Thread Julien Lepiller
Hi Andy,

so you could change the store location, but it would just create the same stone 
structure as /gnu/store elsewhere, with the same issues and no substitutes.

Instead you could try to create a relocatable pack of python, and untar it 
somewhere writable. There might be a small runtime penalty, but we're talking 
about python anyway :)

HTH!

Le 26 février 2023 02:03:01 GMT+01:00, Andy Tai  a écrit :
>Hi, is it possible to have  a /gnu/store/ directory for a package in a
>custom path?  A usage scenario is, say, to have a python interpreter,
>with its package directory that normally exists as
>/gnu/store/, to be somewhere I specified, so it would be
>possible to use that python with python's package manager to install
>python modules as site packages specific to this python (as it is not
>easy to have all python modules available as packages in Guix)
>
>If this python can only run from the /gnu/store/... directory, trying
>to install site packages would normally fail (as /gnu/store/... is
>read only to non root user) and not good practice anyway (as
>/gnu/store/... is not meant to be user touched but only managed by
>Guix)
>