* [PATCH] gnu: xmonad: Add missing propagated input.
@ 2017-01-06 16:34 José Miguel Sánchez García
2017-01-07 21:48 ` Ludovic Courtès
0 siblings, 1 reply; 6+ messages in thread
From: José Miguel Sánchez García @ 2017-01-06 16:34 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1: Type: text/plain, Size: 319 bytes --]
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.
Note that the package remains broken and needs more improvements, but I
haven't
been able to solve them yet.
--
José Miguel Sánchez García
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-xmonad-Add-missing-propagated-input.patch --]
[-- Type: text/x-diff; name=0001-gnu-xmonad-Add-missing-propagated-input.patch, Size: 830 bytes --]
From c2bd154711abf7945895503b1d8250134792e5b2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Miguel=20S=C3=A1nchez=20Garc=C3=ADa?=
<jmi2k@openmailbox.org>
Date: Fri, 6 Jan 2017 17:24:07 +0100
Subject: [PATCH] gnu: xmonad: Add missing propagated input.
* gnu/packages/wm.scm (xmonad)[propagated-inputs]: Add ghc.
---
gnu/packages/wm.scm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 6713560c5..5c44bcff5 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -343,6 +343,8 @@ prompt.")
("ghc-utf8-string" ,ghc-utf8-string)
("ghc-extensible-exceptions" ,ghc-extensible-exceptions)
("ghc-x11" ,ghc-x11)))
+ (propagated-inputs
+ `(("ghc" ,ghc)))
(arguments
`(#:phases
(modify-phases %standard-phases
--
2.11.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] gnu: xmonad: Add missing propagated input.
2017-01-06 16:34 [PATCH] gnu: xmonad: Add missing propagated input José Miguel Sánchez García
@ 2017-01-07 21:48 ` Ludovic Courtès
2017-01-07 22:28 ` José Miguel Sánchez García
2017-01-11 8:25 ` Ricardo Wurmus
0 siblings, 2 replies; 6+ messages in thread
From: Ludovic Courtès @ 2017-01-07 21:48 UTC (permalink / raw)
To: José Miguel Sánchez García; +Cc: guix-devel
José Miguel Sánchez García <jmi2k@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’.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gnu: xmonad: Add missing propagated input.
2017-01-07 21:48 ` Ludovic Courtès
@ 2017-01-07 22:28 ` José Miguel Sánchez García
2017-01-08 10:56 ` Ludovic Courtès
2017-01-11 8:25 ` Ricardo Wurmus
1 sibling, 1 reply; 6+ messages in thread
From: José Miguel Sánchez García @ 2017-01-07 22:28 UTC (permalink / raw)
To: ludo; +Cc: guix-devel
On 2017-01-07 22:48, ludo@gnu.org wrote:
> José Miguel Sánchez García <jmi2k@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?
--
José Miguel Sánchez García
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gnu: xmonad: Add missing propagated input.
2017-01-07 22:28 ` José Miguel Sánchez García
@ 2017-01-08 10:56 ` Ludovic Courtès
2017-01-09 16:28 ` José Miguel Sánchez García
0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2017-01-08 10:56 UTC (permalink / raw)
To: José Miguel Sánchez García; +Cc: guix-devel
Hi!
José Miguel Sánchez García <jmi2k@openmailbox.org> skribis:
> On 2017-01-07 22:48, ludo@gnu.org wrote:
>> José Miguel Sánchez García <jmi2k@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’.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gnu: xmonad: Add missing propagated input.
2017-01-08 10:56 ` Ludovic Courtès
@ 2017-01-09 16:28 ` José Miguel Sánchez García
0 siblings, 0 replies; 6+ messages in thread
From: José Miguel Sánchez García @ 2017-01-09 16:28 UTC (permalink / raw)
To: ludo; +Cc: guix-devel
On 2017-01-08 11:56, ludo@gnu.org wrote:
> Hi!
>
> José Miguel Sánchez García <jmi2k@openmailbox.org> skribis:
>
>> On 2017-01-07 22:48, ludo@gnu.org wrote:
>>> José Miguel Sánchez García <jmi2k@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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gnu: xmonad: Add missing propagated input.
2017-01-07 21:48 ` Ludovic Courtès
2017-01-07 22:28 ` José Miguel Sánchez García
@ 2017-01-11 8:25 ` Ricardo Wurmus
1 sibling, 0 replies; 6+ messages in thread
From: Ricardo Wurmus @ 2017-01-11 8:25 UTC (permalink / raw)
To: Ludovic Courtès
Cc: José Miguel Sánchez García, guix-devel
Ludovic Courtès <ludo@gnu.org> writes:
> José Miguel Sánchez García <jmi2k@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.
Could we avoid all of this if we encouraged users to also install
whichever version of GHC they liked best? Propagation seems bad here
and hard-coding a particular version of GHC in the store also doesn’t
quite seem right to me.
If a user wants to use a different GHC with libraries that are only
available with their particular version of GHC to reconfigure xmonad
then I think it’s best to just leave the decision up to the user. The
user decides by installing their desired version of GHC into their
profile.
--
Ricardo
GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
http://elephly.net
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-01-11 8:25 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-06 16:34 [PATCH] gnu: xmonad: Add missing propagated input José Miguel Sánchez García
2017-01-07 21:48 ` Ludovic Courtès
2017-01-07 22:28 ` José Miguel Sánchez García
2017-01-08 10:56 ` Ludovic Courtès
2017-01-09 16:28 ` José Miguel Sánchez García
2017-01-11 8:25 ` Ricardo Wurmus
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.