On 2017-01-08 11:56, l...@gnu.org wrote:
Hi!
José Miguel Sánchez García <jm...@openmailbox.org> skribis:

On 2017-01-07 22:48, l...@gnu.org wrote:
José Miguel Sánchez García <jm...@openmailbox.org> skribis:

xmonad package needs some love, and this is the first step. ghc should
be a
propagated input, because it's needed for certain commands such as
xmonad --recompile.
Instead of propagating it, would it be possible to hard-code the
absolute file name of ‘ghc’ inside the xmonad source?

That would avoid pulling in GHC in the user’s profile, which could
conflict with the user’s GHC.

Thanks!

Ludo’.
I don't understand. xmonad needs ghc at runtime to compile the
configuration
file (because the configuration file is a binary and XMonad is a
library).
Could you explain better?
Propagated inputs are automatically added to the user’s profile.  So
with the patch you suggested, when someone installs xmonad, they’d also
get GHC in their profile. This solves the problem at hand, but it’s not
great: it “pollutes” the user’s profile, and it could conflict with
another GHC already present in the profile.

Thus, when possible, we often patch patches to do (roughly):

  execv("/gnu/store/…/bin/ghc", …);

instead of

  execvp("ghc", …);

IOW, we specify the absolute file name of the executable instead of
relying on $PATH lookup.

An example of that is ‘gv’, where we patch the source to refer to the
absolute file name of ‘gs’ instead of looking it up in $PATH:

http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/gv.scm#n46
Same for ‘egrep’:

http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/base.scm#n95
HTH!

Ludo’.
Oh, I see. I've been trying to fix it properly but I can't (I can patch the source, but it generates other errors I haven't solved yet). I think I'll
keep working on the patch on my free time until I can make it work fine.

Thanks Ludo!

--
José Miguel Sánchez García

Reply via email to