Guix usage

10 replies [Last post]
mason

I am a member!

Offline
Joined: 07/07/2017

Guix was recommended to me as a solution to a particular problem in another thread, and it seems promising in general. I have enough questions that it seemed worth opening a new thread.

1. Configuring installed files for use? For example, if I install Icecat via Synaptic it is immediately added to the launcher menu and I can run it from a terminal with $ icecat whereas if installed via Guix it seems like I have to run it with
$ cd ~/.guix-profile/bin
$ ./icecat

which is much less convenient. I could create a shortcut to access it more conveniently, but maybe there is a cleaner or more proper approach.

2. Is it possible to get Synaptic to recognize a package installed via Guix as an alternate version. This might help with question #1, and it seems like it might be easier and more organized than using two separate package managers.

3. When I run $ giux package -A evolution I see evolution-data-server, but not evolution. It seems odd to me to include one and not the other. Is it possible that I am not seeing all available packages?

4. Moreover, if I could upgrade Evolution (or another default GNOME program) via Guix, what be be the most effective way of replacing the old version in a way that makes it work with the GNOME applet etc.? This might be related to question #2.

Thanks!

happy_gnu
Offline
Joined: 08/06/2017

1.- You have to add Guix to your PATH and reboot

2.- No this is not possible, you could install Emacs with Guix and then launch this Emacs and it will have installed the necessary packages to use it as Synaptic.

3.- I am not sure, it is possible. You can look for all the installed packages using Emacs. Or looking for them here https://www.gnu.org/software/guix/packages/

4.-Remove the package with synaptic and install the Guix version.

WARNING: DO NOT REMOVE THINGS UNLESS YOU ARE ABSOLUTELY SURE WHAT YOU ARE DOING.

Now for 1. How to add Guix to your path...

Did you follow step 8?

I'll save you the trouble it links here:

https://www.gnu.org/software/guix/manual/html_node/Application-Setup.html#Application-Setup

mason

I am a member!

Offline
Joined: 07/07/2017

I've done step 8. When I run guix package -i glibc-locales I get guile: warning: failed to install locale
warning: failed to install locale: Invalid argument
guix package: warning: Consider running 'guix pull' followed by
'guix package -u' to get up-to-date packages and security updates.
The following package will be upgraded:
glibc-locales 2.25 -> 2.25 /gnu/store/p5z9rh4m4qkmjygxcbp0q244nkwz7zxn-glibc-locales-2.25
substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... substitute: updating list of substitutes from 'https://mirror.hydra.gnu.org'... 100.0%
nothing to be done

(When I run 'guix pull' I always get 'failed to expand heap by x bytes' before it completes, so hopefully that isn't important.)

I get no errors when I run export GUIX_LOCPATH=$HOME/.guix-profile/lib/locale

What should happen if this step worked correctly?

happy_gnu
Offline
Joined: 08/06/2017

When you do the EXPORT you should be able to launch software installed with Guix by just typing "program" you installed hello so just type

$ hello

It should run.
If you puth the export in your PATH you should be able to do this and probably see the icons of the programs on the menu of your Desktop Environment (I am not sure about this is I don't use menus only I3wm with dmenu)

The path should be ~/.bash_profile but I don't remember exactly to be honest.

Maybe someone can help us or you can ask for a little more help on #guix on IRC they are friendly and helpful.

If you use IRC make sure to join #lgn :) I am there most of the time. Is a great channel

happy_gnu
Offline
Joined: 08/06/2017
mason

I am a member!

Offline
Joined: 07/07/2017

Does that mean I should add export GUIX_LOCPATH=$HOME/.guix-profile/lib/locale to '~/.profile' instead of executing it in the terminal? If so what should be different after I do that? I don't know what it looks like when Guix is working correctly so I don't know how to check if something is working.

ADFENO
Offline
Joined: 12/31/2012

Hi all,

I just came back from a turbulence on the email service provider I use,
so I'll try to answer the questions as best as I can:

1. I'll split it in two:

1. Make packages appear as simple terminal commands: For this to
work, the PATH variable must reference to important places inside
"${HOME}/.guix-profile" (for clarification: "${HOME}" is [Your
user's home], don't worry, the shell understands it correctly, you
can even test it by doing "echo ${HOME}").

To do so, edit the ".profile" file that is under your user's home
(if it doesn't exist: create it), and insert the following text:

--8<---------------cut here---------------start------------->8---
export GUIX_PROFILE="${HOME}/.guix-profile"
source "${GUIX_PROFILE}/etc/profile"
export GUIX_LOCPATH="${GUIX_PROFILE}/lib/locale"
export GUIX_GTK3_PATH="${GUIX_PROFILE}/lib/gtk-3.0${GUIX_GTK3_PATH:+:}${GUIX_GTK3_PATH}"
export PATH="${GUIX_PROFILE}/bin:${GUIX_PROFILE}/sbin${PATH:+:}${PATH}"
--8<---------------cut here---------------end--------------->8---

These "${[Some variable]:+:}" simply make sure that there is no
ending ":" if "[Some variable]" is unset.

Now, you can simply log out and then log back in (no need to
reboot the computer), and notice that IceCat can be launched from
the terminal using the `icecat` command.

2. To make an application launcher appear in the menus, provided it
does have a launcher file (I know IceCat does): For this we will
once again edit the user's ".profile". This time, though we need
to take some important notes.

In a terminal, make it show us what is inside ${XDG_DATA_DIRS}, to
do this, do: echo ${XDG_DATA_DIRS}

This will show you were most applications will look for things
such as launchers, text fonts, themes, and so on (besides the
user's ".local/share" directory). We must take note of what was
just printed/shown, I'll call this note as "Copied text".

Now, edit the user's ".profile", and add, after the last line that
I gave in item 1.1:

--8<---------------cut here---------------start------------->8---
export XDG_DATA_DIRS="${GUIX_PROFILE}/share:[Copied text, without these brackets]"
--8<---------------cut here---------------end--------------->8---

Now, you can simply log out and then log back in (no need to
reboot the computer), and notice that IceCat can be launched from
the menus.

2. Already answered.

3. Evolution (email client) itself isn't packaged yet. The data server
of it is. In fact, some packages depend on the data server to do some
things.

4. Remove the package with Synaptic and install from Guix. Be careful
though when removing packages using Synaptic. Thankfully, Synaptic is
one of the package managers that makes it very clear what will be
removed/updated/replaced/installed before doing anything.

It's a good idea to simply copy the list of actions that Synaptic
tells you that it would do, and post the list here in case of
doubt. People here will probably know if some package will end up
removing "too much" stuff.

Optionally, you can start searching for each item in that list of
actions, but this is not required.

Respectfully, Adonay.

Happy hacking! :)

--
- [[https://libreplanet.org/wiki/User:Adfeno]]
- Palestrante e consultor sobre /software/ livre (não confundir com
gratis).
- "WhatsApp"? Ele não é livre, por isso não uso. Iguais a ele prefiro
GNU Ring, ou Tox. Quer outras formas de contato? Adicione o vCard
que está no endereço acima aos teus contatos.
- Pretende me enviar arquivos .doc, .ppt, .cdr, ou .mp3? OK, eu
aceito, mas não repasso. Entrego apenas em formatos favoráveis ao
/software/ livre. Favor entrar em contato em caso de dúvida.

mason

I am a member!

Offline
Joined: 07/07/2017

All of that worked perfectly. Thanks for your help.

happy_gnu
Offline
Joined: 08/06/2017

It was an amazing answer Adfeno :).

I am glad everything is working now mason :)

ADFENO
Offline
Joined: 12/31/2012

You're welcome! :)

ADFENO
Offline
Joined: 12/31/2012

You're welcome! :)