guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] gnu: xmonad: Add missing propagated input.


From: Ludovic Courtès
Subject: Re: [PATCH] gnu: xmonad: Add missing propagated input.
Date: Sun, 08 Jan 2017 11:56:24 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Hi!

José Miguel Sánchez García <address@hidden> skribis:

> On 2017-01-07 22:48, address@hidden wrote:
>> José Miguel Sánchez García <address@hidden> 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’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]