unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* getting applications from Nix to have access to fonts
@ 2018-08-19  1:30 Benjamin Slade
  2019-04-29  8:46 ` Santana, Divan
  0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Slade @ 2018-08-19  1:30 UTC (permalink / raw)
  To: help-guix

I'm having trouble getting external applications, specifically things
installed via Nix, to have access to fonts, which often is the
difference between them working or not working.

For instance, I installed Gargoyle (the text adventure/interactive
fiction interpreter - http://ccxvii.net/gargoyle/ ) from Nix. If I set
gtk2 to use something other than 'sans' as the default font, when I try
to launch Gargoyle, it hangs, with the terminal output `Fontconfig
error: Cannot load default config file`. I have similar issues with
other pieces of software; those which don't hang, usually just have
access to whatever fonts they're actually packaged with, and not any of
the fonts on my system (including fonts installed via Nix itself).

In #guixsd, pkill9 recommended adding `~/.local/bin` to PATH in
~/.profile, and creating a wrapper like this:

<----------------#+BEGIN_SRC bash------------>
#!/bin/sh
# Wrapper to run Gargoyle built and packaged by Nix

MESA_LIB=$(dirname $(realpath /run/current-system/profile/lib/libGL.so)) #To get webgl working
export LD_LIBRARY_PATH="$MESA_LIB${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
#export FONTCONFIG_PATH="$(guix build fontconfig)/etc/fonts${FONTCONFIG_PATH:+:}$FONTCONFIG_PATH"
export FONTCONFIG_PATH="$(guix build fontconfig)/etc/fonts"

exec -a "$0" "/nix/var/nix/profiles/per-user/$USER/profile/bin/gargoyle" "$@"
<-----------------#+END_SRC------------------->


However, even doing this, I end up with exactly the same issues. (And
I've tried calling the script directly, e.g. with
`~/.local/bin/gargoyle`, just in case the PATH from .profile wasn't
working correctly.)

Does anyone have any insight or suggestions on how to resolve this?


-- 
Benjamin Slade - https://babbagefiles.xyz
  `(pgp_fp: ,(21BA 2AE1 28F6 DF36 110A 0E9C A320 BBE8 2B52 EE19))
    '(sent by mu4e on Emacs running under GNU/Linux . https://gnu.org )
       `(Choose Linux ,(Choose Freedom) . https://linux.com )

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: getting applications from Nix to have access to fonts
  2018-08-19  1:30 getting applications from Nix to have access to fonts Benjamin Slade
@ 2019-04-29  8:46 ` Santana, Divan
  0 siblings, 0 replies; 2+ messages in thread
From: Santana, Divan @ 2019-04-29  8:46 UTC (permalink / raw)
  To: help-guix@gnu.org

Benjamin Slade <beoram@gmail.com> writes:

> I'm having trouble getting external applications, specifically things
> installed via Nix, to have access to fonts, which often is the
> difference between them working or not working.
>
> For instance, I installed Gargoyle (the text adventure/interactive
> fiction interpreter - http://ccxvii.net/gargoyle/ ) from Nix. If I set
> gtk2 to use something other than 'sans' as the default font, when I try
> to launch Gargoyle, it hangs, with the terminal output `Fontconfig
> error: Cannot load default config file`. I have similar issues with
> other pieces of software; those which don't hang, usually just have
> access to whatever fonts they're actually packaged with, and not any of
> the fonts on my system (including fonts installed via Nix itself).
>
> In #guixsd, pkill9 recommended adding `~/.local/bin` to PATH in
> ~/.profile, and creating a wrapper like this:
>
> <----------------#+BEGIN_SRC bash------------>
> #!/bin/sh
> # Wrapper to run Gargoyle built and packaged by Nix
>
> MESA_LIB=$(dirname $(realpath /run/current-system/profile/lib/libGL.so)) #To get webgl working
> export LD_LIBRARY_PATH="$MESA_LIB${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
> #export FONTCONFIG_PATH="$(guix build fontconfig)/etc/fonts${FONTCONFIG_PATH:+:}$FONTCONFIG_PATH"
> export FONTCONFIG_PATH="$(guix build fontconfig)/etc/fonts"
>
> exec -a "$0" "/nix/var/nix/profiles/per-user/$USER/profile/bin/gargoyle" "$@"
> <-----------------#+END_SRC------------------->
>
>
> However, even doing this, I end up with exactly the same issues. (And
> I've tried calling the script directly, e.g. with
> `~/.local/bin/gargoyle`, just in case the PATH from .profile wasn't
> working correctly.)
>
> Does anyone have any insight or suggestions on how to resolve this?

Did you ever come right with this?

Have a work around?
 

This email is subject to a disclaimer.

Visit the FNB website and view the email disclaimer by clicking the "About FNB + Legal" and "Legal Matters" links.
If you are unable to access our website, please contact us to send you a copy of the email disclaimer.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-29  8:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-19  1:30 getting applications from Nix to have access to fonts Benjamin Slade
2019-04-29  8:46 ` Santana, Divan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).