Re: Integrate Guix GUI programs into foreign distro's desktop?

2020-12-25 Thread Hartmut Goebel
Am 06.12.20 um 19:46 schrieb Hartmut Goebel:
> What is the correct way for doing so? What needs to be installed in the
> profile to make this work smoothly?

I made it work by adding the follwing code to ~/.bash_profile. This also
handles other env-vars and also the case one is running a login-shell in
an environment.

if [ -n "$GUIX_ENVIRONMENT" ] ; then
    # should only come here if a login-shell is started within a guix
environ
    _guix_profile="$GUIX_ENVIRONMENT"
elif [ -z "$GUIX_PROFILE" -a -r "$HOME/.guix-profile" ] ; then
    _guix_profile="$HOME/.guix-profile"
elif [ -n "$GUIX_PROFILE" -a -r "$GUIX_PROFILE" ] ; then
    _guix_profile="$GUIX_PROFILE"
fi
if [ -n "$_guix_profile" ] ; then
    source "$_guix_profile/etc/profile"
    if [ -r "$_guix_profile/lib/locale" ] ; then
    export
GUIX_LOCPATH="$_guix_profile/lib/locale${GUIX_LOCPATH:+:}$GUIX_LOCPATH"
    fi
    if [ -r "$_guix_profile/share" ] ; then
    export
XDG_DATA_DIRS="$_guix_profile/share${XDG_DATA_DIRS:+:}$XDG_DATA_DIRS"
    fi
    if [ -r "$_guix_profile/etc/ssl/certs/ca-certificates.crt" ] ; then
    export SSL_CERT_DIR="$_guix_profile/etc/ssl/certs"
    export
SSL_CERT_FILE="$_guix_profile/etc/ssl/certs/ca-certificates.crt"
    export GIT_SSL_CAINFO="$SSL_CERT_FILE"
    fi
fi
unset _guix_profile

-- 
Regards
Hartmut Goebel

| Hartmut Goebel  | h.goe...@crazy-compilers.com   |
| www.crazy-compilers.com | compilers which you thought are impossible |




Re: Integrate Guix GUI programs into foreign distro's desktop?

2020-12-24 Thread Bonface M. K.
Hartmut Goebel 
writes:

[...]

>> The variables defined in the
>> /etc/profile set the correct paths wrt
>> your actual profile...
>
> Have you installed gtk+ in your profile? This
> package is the one defining search-path
> GUIX_GTK3_PATH.
>

Unfortunately nope. I don't think I can be of any
help in this case. Perhaps someone else can chime
in ...

> (When installing gtk+ in my environment/profile, I
> also get GUIX_GTK3_PATH defined. gtk+ propagates
> atk, which propagates glib, which defines
> search-path XDG_DATA_DIR - which is why
> XDG_DATA_DIR is also defined in the etc/profile.)

-- 
Bonface M. K. 
Humble GNU Emacs User / Bearer of scheme-y parens
Curator:  / Twitter: @BonfaceKilz
GPG Key: D4F09EB110177E03C28E2FE1F5BBAE1E0392253F


signature.asc
Description: PGP signature


Re: Integrate Guix GUI programs into foreign distro's desktop?

2020-12-24 Thread Hartmut Goebel

Am 07.12.20 um 12:32 schrieb Bonface M. K.:

In that case, you'd just modify the path to point
to your profile's bin. Another way would be to
source the /etc/profile which
basically set's all these paths for you.


This is what I would expect, but this is not the case. E.g. when 
installing "dino", a GTK application providing .desktop file, 
XDG_DATA_DIRS is not defined in $GUIX_ENVIRONMENT/etc/profile (same for 
a profile)


$ guix environment --ad-hoc dino

# Proof dino "somehow" has a search-path definition
$ grep -E 'XDG|GTK' $(which dino)
export XDG_DATA_DIRS=…
export GTK_PATH=…

# Proof environment has a "share" directory and there are .desktop files
$ ls -F $GUIX_ENVIRONMENT
bin@  etc/  include@  lib/  manifest  share/
$ ls -F $GUIX_ENVIRONMENT/share/applications/
im.dino.Dino.desktop@  mimeinfo.cache@

# Proof XDG_DATA_DIR is not set for the environment
$ grep -E 'XDG|GTK' $GUIX_ENVIRONMENT/etc/profile
$  # no results



Wrt QT, I'm not exactly sure how to help with
that. I barely use applications that use QT(most
of the things I run use GTK).


As shown above, this does not always hold even for GTK applications.



The variables defined in the
/etc/profile set the correct paths wrt
your actual profile...


Have you installed gtk+ in your profile? This package is the one 
defining search-path GUIX_GTK3_PATH.


(When installing gtk+ in my environment/profile, I also get 
GUIX_GTK3_PATH defined. gtk+ propagates atk, which propagates glib, 
which defines search-path XDG_DATA_DIR - which is why XDG_DATA_DIR is 
also defined in the etc/profile.)



--
Regards
Hartmut Goebel

| Hartmut Goebel  | h.goe...@crazy-compilers.com   |
| www.crazy-compilers.com | compilers which you thought are impossible |




Re: Integrate Guix GUI programs into foreign distro's desktop?

2020-12-07 Thread John Soo
 Hey Hartmut, 

 
You may want to look into wrap-program which is used in many packages. Similar 
things are done I. The glib-or-gtk-build-system (I think it is called).  
 

 
Hope that helps,
 

 
John
 


Re: Integrate Guix GUI programs into foreign distro's desktop?

2020-12-07 Thread Bonface M. K.
Hartmut Goebel 
writes:

> Hi,
>> What I do is to ensure that I have the path to the
>> Guix binaries configured properly:
>>
>> --8<---cut here---start->8---
>> export PATH="$HOME/.config/guix/current/bin:$HOME/.local/bin:$PATH"
>
> Thanks, anyhow this does not lock like what I'
> seeking. I want to add GUI programm, which are
> isntalled in a profile, while your example only
> adds guix itself - not any profile.
>

In that case, you'd just modify the path to point
to your profile's bin. Another way would be to
source the /etc/profile which
basically set's all these paths for you.

> And what about not GUIC_LOC_PATH,  XDG_*_DIRS, 
> and all the other env-vars. How to avoid conflicts
> with QTDIRS5, QT_PLUGIN_PATH?

See above.

Wrt QT, I'm not exactly sure how to help with
that. I barely use applications that use QT(most
of the things I run use GTK). I can see that GTK
is somewhat set:

--8<---cut here---start->8--
-
➜  ~ less ~/.guix-profile/etc/profile | grep GTK
export
GUIX_GTK3_PATH="${GUIX_PROFILE:-/gnu/store/36cyb6ndkdd2r9v2fhra68yzdnc89sk3-profile}/lib/gtk-3.0${GUIX_GTK3_PATH:+:}$GUIX_GTK3_PATH"

--8<---cut here---end--->8---

The variables defined in the
/etc/profile set the correct paths wrt
your actual profile...

I'm not sure if I was helpful... perhaps someone
else who uses QT applications could chime in and
provide some hints.

-- 
Bonface M. K. 
Humble GNU Emacs User / Bearer of scheme-y parens
Curator:  / Twitter: @BonfaceKilz
GPG Key: D4F09EB110177E03C28E2FE1F5BBAE1E0392253F


signature.asc
Description: PGP signature


Re: Integrate Guix GUI programs into foreign distro's desktop?

2020-12-06 Thread Hartmut Goebel

Hi,

What I do is to ensure that I have the path to the
Guix binaries configured properly:

--8<---cut here---start->8---
export PATH="$HOME/.config/guix/current/bin:$HOME/.local/bin:$PATH"


Thanks, anyhow this does not lock like what I' seeking. I want to add 
GUI programm, which are isntalled in a profile, while your example only 
adds guix itself - not any profile.


And what about not GUIC_LOC_PATH,  XDG_*_DIRS,  and all the other 
env-vars. How to avoid conflicts with QTDIRS5, QT_PLUGIN_PATH?


--
Regards
Hartmut Goebel

| Hartmut Goebel  | h.goe...@crazy-compilers.com   |
| www.crazy-compilers.com | compilers which you thought are impossible |




Re: Integrate Guix GUI programs into foreign distro's desktop?

2020-12-06 Thread Bonface M. K.

Hi Hartmut!

Hartmut Goebel 
writes:

> Hi,
>
> I'd like to use a Guix profile containing some GUI programs (esp.
> ungoogle-chromium) as part of my foreign distro's desktop environment.
>

You'd just run "guix install ". FWIW, I
use Guix as my daily driver(but running on
ArchLinux)

> What is the correct way for doing so? What needs to be installed in the
> profile to make this work smoothly?

What I do is to ensure that I have the path to the
Guix binaries configured properly:

--8<---cut here---start->8---
export PATH="$HOME/.config/guix/current/bin:$HOME/.local/bin:$PATH"
--8<---cut here---end--->8---

Best to have that as part of your .zshrc or
.bashrc file. So whenever you install the GUI
apps(for example-- in my case-- I use Emacs), your
system first checks for it in your guix path.

HTH!
-- 
Bonface M. K. 
Humble GNU Emacs User / Bearer of scheme-y parens
Curator:  / Twitter: @BonfaceKilz
GPG Key: D4F09EB110177E03C28E2FE1F5BBAE1E0392253F


signature.asc
Description: PGP signature


Re: Integrate Guix GUI programs into foreign distro's desktop?

2020-12-06 Thread Jérémy Korwin-Zmijowski
Have you encounter issues yet?

Jérémy
-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma 
brièveté.


Integrate Guix GUI programs into foreign distro's desktop?

2020-12-06 Thread Hartmut Goebel
Hi,

I'd like to use a Guix profile containing some GUI programs (esp.
ungoogle-chromium) as part of my foreign distro's desktop environment.

What is the correct way for doing so? What needs to be installed in the
profile to make this work smoothly?

-- 
Regards
Hartmut Goebel

| Hartmut Goebel  | h.goe...@crazy-compilers.com   |
| www.crazy-compilers.com | compilers which you thought are impossible |