* [PATCH] gnu: aspell: Wrap binary to find dictionaries.
@ 2016-01-09 10:46 Federico Beffa
2016-01-09 15:43 ` Alex Kost
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Federico Beffa @ 2016-01-09 10:46 UTC (permalink / raw)
To: Guix-devel
[-- Attachment #1: Type: text/plain, Size: 108 bytes --]
Currently just installing aspell (and a dictionary) doesn't work. This
fixes this situation.
Regards,
Fede
[-- Attachment #2: 0011-gnu-aspell-Wrap-binary-to-find-dictionaries.patch --]
[-- Type: text/x-diff, Size: 1269 bytes --]
From e183f8e473b97406968ecbda9fb13ebdf60963ec Mon Sep 17 00:00:00 2001
From: Federico Beffa <beffa@fbengineering.ch>
Date: Fri, 8 Jan 2016 14:23:12 +0100
Subject: [PATCH 11/11] gnu: aspell: Wrap binary to find dictionaries.
* gnu/packages/aspell.scm (aspell): Add 'wrap-aspell phase.
---
gnu/packages/aspell.scm | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/gnu/packages/aspell.scm b/gnu/packages/aspell.scm
index 85d7cfa..79b57b5 100644
--- a/gnu/packages/aspell.scm
+++ b/gnu/packages/aspell.scm
@@ -38,6 +38,16 @@
(base32
"1qgn5psfyhbrnap275xjfrzppf5a83fb67gpql0kfqv37al869gm"))))
(build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'wrap-aspell
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((bin/aspell (string-append (assoc-ref outputs "out")
+ "/bin/aspell")))
+ (wrap-program bin/aspell
+ '("ASPELL_CONF" "" =
+ ("${ASPELL_CONF:-\"dict-dir ${GUIX_PROFILE:-$HOME/.guix-profile}/lib/aspell\"}")))))))))
(inputs `(("perl" ,perl)))
(home-page "http://aspell.net/")
(synopsis "Spell checker")
--
2.6.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] gnu: aspell: Wrap binary to find dictionaries.
2016-01-09 10:46 [PATCH] gnu: aspell: Wrap binary to find dictionaries Federico Beffa
@ 2016-01-09 15:43 ` Alex Kost
2016-01-09 16:29 ` Alex Kost
2016-01-10 20:48 ` Ludovic Courtès
2016-02-03 8:21 ` Ludovic Courtès
2 siblings, 1 reply; 8+ messages in thread
From: Alex Kost @ 2016-01-09 15:43 UTC (permalink / raw)
To: Federico Beffa; +Cc: Guix-devel
Federico Beffa (2016-01-09 13:46 +0300) wrote:
> Currently just installing aspell (and a dictionary) doesn't work. This
> fixes this situation.
It works on GuixSD, because /etc/profile sets ASPELL_CONF, so if this
patch will be accepted, I think 'operating-system-etc-service' from (gnu
system) module should also be adjusted.
> From e183f8e473b97406968ecbda9fb13ebdf60963ec Mon Sep 17 00:00:00 2001
> From: Federico Beffa <beffa@fbengineering.ch>
> Date: Fri, 8 Jan 2016 14:23:12 +0100
> Subject: [PATCH 11/11] gnu: aspell: Wrap binary to find dictionaries.
>
> * gnu/packages/aspell.scm (aspell): Add 'wrap-aspell phase.
> ---
> gnu/packages/aspell.scm | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/gnu/packages/aspell.scm b/gnu/packages/aspell.scm
> index 85d7cfa..79b57b5 100644
> --- a/gnu/packages/aspell.scm
> +++ b/gnu/packages/aspell.scm
> @@ -38,6 +38,16 @@
> (base32
> "1qgn5psfyhbrnap275xjfrzppf5a83fb67gpql0kfqv37al869gm"))))
> (build-system gnu-build-system)
> + (arguments
> + `(#:phases
> + (modify-phases %standard-phases
> + (add-after 'install 'wrap-aspell
> + (lambda* (#:key outputs #:allow-other-keys)
> + (let ((bin/aspell (string-append (assoc-ref outputs "out")
> + "/bin/aspell")))
> + (wrap-program bin/aspell
> + '("ASPELL_CONF" "" =
> + ("${ASPELL_CONF:-\"dict-dir ${GUIX_PROFILE:-$HOME/.guix-profile}/lib/aspell\"}")))))))))
Just to clarify: what if I would like to run aspell with my own
ASPELL_CONF. Will it work or will this default value override my own?
I mean I want to run aspell like this:
ASPELL_CONF=<something> aspell
Will aspell be started with my <something>?
--
Alex
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] gnu: aspell: Wrap binary to find dictionaries.
2016-01-09 15:43 ` Alex Kost
@ 2016-01-09 16:29 ` Alex Kost
2016-01-09 20:29 ` Leo Famulari
0 siblings, 1 reply; 8+ messages in thread
From: Alex Kost @ 2016-01-09 16:29 UTC (permalink / raw)
To: Federico Beffa; +Cc: Guix-devel
>> From e183f8e473b97406968ecbda9fb13ebdf60963ec Mon Sep 17 00:00:00 2001
>> From: Federico Beffa <beffa@fbengineering.ch>
>> Date: Fri, 8 Jan 2016 14:23:12 +0100
>> Subject: [PATCH 11/11] gnu: aspell: Wrap binary to find dictionaries.
>>
>> * gnu/packages/aspell.scm (aspell): Add 'wrap-aspell phase.
'wrap-aspell' phase.
Typo --------------------------------------------------^
[...]
>> + (wrap-program bin/aspell
>> + '("ASPELL_CONF" "" =
>> + ("${ASPELL_CONF:-\"dict-dir ${GUIX_PROFILE:-$HOME/.guix-profile}/lib/aspell\"}")))))))))
>
> Just to clarify: what if I would like to run aspell with my own
> ASPELL_CONF. Will it work or will this default value override my own?
> I mean I want to run aspell like this:
>
> ASPELL_CONF=<something> aspell
>
> Will aspell be started with my <something>?
Sorry for being lazy, now I see that it will work. Thanks to you (and
to the bash manual) for introducing me to ${parameter:-word} construct.
--
Alex
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] gnu: aspell: Wrap binary to find dictionaries.
2016-01-09 16:29 ` Alex Kost
@ 2016-01-09 20:29 ` Leo Famulari
0 siblings, 0 replies; 8+ messages in thread
From: Leo Famulari @ 2016-01-09 20:29 UTC (permalink / raw)
To: Alex Kost; +Cc: Guix-devel, Federico Beffa
On Sat, Jan 09, 2016 at 07:29:20PM +0300, Alex Kost wrote:
> >> From e183f8e473b97406968ecbda9fb13ebdf60963ec Mon Sep 17 00:00:00 2001
> >> From: Federico Beffa <beffa@fbengineering.ch>
> >> Date: Fri, 8 Jan 2016 14:23:12 +0100
> >> Subject: [PATCH 11/11] gnu: aspell: Wrap binary to find dictionaries.
> >>
> >> * gnu/packages/aspell.scm (aspell): Add 'wrap-aspell phase.
> 'wrap-aspell' phase.
> Typo --------------------------------------------------^
>
> [...]
> >> + (wrap-program bin/aspell
> >> + '("ASPELL_CONF" "" =
> >> + ("${ASPELL_CONF:-\"dict-dir ${GUIX_PROFILE:-$HOME/.guix-profile}/lib/aspell\"}")))))))))
> >
> > Just to clarify: what if I would like to run aspell with my own
> > ASPELL_CONF. Will it work or will this default value override my own?
> > I mean I want to run aspell like this:
> >
> > ASPELL_CONF=<something> aspell
> >
> > Will aspell be started with my <something>?
>
> Sorry for being lazy, now I see that it will work. Thanks to you (and
> to the bash manual) for introducing me to ${parameter:-word} construct.
For reference, this useful feature is 'parameter expansion' and it is in
the POSIX spec:
http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_02
>
> --
> Alex
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] gnu: aspell: Wrap binary to find dictionaries.
2016-01-09 10:46 [PATCH] gnu: aspell: Wrap binary to find dictionaries Federico Beffa
2016-01-09 15:43 ` Alex Kost
@ 2016-01-10 20:48 ` Ludovic Courtès
2016-02-03 8:21 ` Ludovic Courtès
2 siblings, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2016-01-10 20:48 UTC (permalink / raw)
To: Federico Beffa; +Cc: Guix-devel
[-- Attachment #1: Type: text/plain, Size: 436 bytes --]
Federico Beffa <beffa@ieee.org> skribis:
> From e183f8e473b97406968ecbda9fb13ebdf60963ec Mon Sep 17 00:00:00 2001
> From: Federico Beffa <beffa@fbengineering.ch>
> Date: Fri, 8 Jan 2016 14:23:12 +0100
> Subject: [PATCH 11/11] gnu: aspell: Wrap binary to find dictionaries.
>
> * gnu/packages/aspell.scm (aspell): Add 'wrap-aspell phase.
Good idea, LGTM!
As Alex suggests, bonus point if you add the following change to this
commit:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 454 bytes --]
diff --git a/gnu/system.scm b/gnu/system.scm
index 4aedb7e..aab18ef 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -457,9 +457,6 @@ else
export PATH=\"$HOME/.guix-profile/bin:$PATH\"
fi
-# Allow Aspell to find dictionaries installed in the user profile.
-export ASPELL_CONF=\"dict-dir $HOME/.guix-profile/lib/aspell\"
-
# Allow GStreamer-based applications to find plugins.
export GST_PLUGIN_PATH=\"$HOME/.guix-profile/lib/gstreamer-1.0\"
[-- Attachment #3: Type: text/plain, Size: 23 bytes --]
Thanks!
Ludo’.
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] gnu: aspell: Wrap binary to find dictionaries.
2016-01-09 10:46 [PATCH] gnu: aspell: Wrap binary to find dictionaries Federico Beffa
2016-01-09 15:43 ` Alex Kost
2016-01-10 20:48 ` Ludovic Courtès
@ 2016-02-03 8:21 ` Ludovic Courtès
2016-02-03 9:12 ` Federico Beffa
2 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2016-02-03 8:21 UTC (permalink / raw)
To: Federico Beffa; +Cc: Guix-devel
Federico Beffa <beffa@ieee.org> skribis:
> From e183f8e473b97406968ecbda9fb13ebdf60963ec Mon Sep 17 00:00:00 2001
> From: Federico Beffa <beffa@fbengineering.ch>
> Date: Fri, 8 Jan 2016 14:23:12 +0100
> Subject: [PATCH 11/11] gnu: aspell: Wrap binary to find dictionaries.
>
> * gnu/packages/aspell.scm (aspell): Add 'wrap-aspell phase.
I pushed this patch along with the corresponding (gnu system) change as
81fc64d.
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] gnu: aspell: Wrap binary to find dictionaries.
2016-02-03 8:21 ` Ludovic Courtès
@ 2016-02-03 9:12 ` Federico Beffa
2016-02-03 21:53 ` Ludovic Courtès
0 siblings, 1 reply; 8+ messages in thread
From: Federico Beffa @ 2016-02-03 9:12 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: Guix-devel
On Wed, Feb 3, 2016 at 9:21 AM, Ludovic Courtès <ludo@gnu.org> wrote:
> Federico Beffa <beffa@ieee.org> skribis:
>
>> From e183f8e473b97406968ecbda9fb13ebdf60963ec Mon Sep 17 00:00:00 2001
>> From: Federico Beffa <beffa@fbengineering.ch>
>> Date: Fri, 8 Jan 2016 14:23:12 +0100
>> Subject: [PATCH 11/11] gnu: aspell: Wrap binary to find dictionaries.
>>
>> * gnu/packages/aspell.scm (aspell): Add 'wrap-aspell phase.
>
> I pushed this patch along with the corresponding (gnu system) change as
> 81fc64d.
I wanted to push the last batch of patches that I proposed all
together (including the aspell gnu system you suggested). I've now
received a reply from Dominik and will do so in the next few days.
Please don't push other ones from the set. They are coming.
Thanks,
Fede
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] gnu: aspell: Wrap binary to find dictionaries.
2016-02-03 9:12 ` Federico Beffa
@ 2016-02-03 21:53 ` Ludovic Courtès
0 siblings, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2016-02-03 21:53 UTC (permalink / raw)
To: Federico Beffa; +Cc: Guix-devel
Federico Beffa <beffa@ieee.org> skribis:
> On Wed, Feb 3, 2016 at 9:21 AM, Ludovic Courtès <ludo@gnu.org> wrote:
>> Federico Beffa <beffa@ieee.org> skribis:
>>
>>> From e183f8e473b97406968ecbda9fb13ebdf60963ec Mon Sep 17 00:00:00 2001
>>> From: Federico Beffa <beffa@fbengineering.ch>
>>> Date: Fri, 8 Jan 2016 14:23:12 +0100
>>> Subject: [PATCH 11/11] gnu: aspell: Wrap binary to find dictionaries.
>>>
>>> * gnu/packages/aspell.scm (aspell): Add 'wrap-aspell phase.
>>
>> I pushed this patch along with the corresponding (gnu system) change as
>> 81fc64d.
>
> I wanted to push the last batch of patches that I proposed all
> together (including the aspell gnu system you suggested). I've now
> received a reply from Dominik and will do so in the next few days.
>
> Please don't push other ones from the set. They are coming.
OK, noted.
Apologies if I stepped on your toes. I was looking at GuixSD’s
/etc/profile, which reminded me of this Aspell patch, and I thought it
had been lost.
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-02-03 21:53 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-09 10:46 [PATCH] gnu: aspell: Wrap binary to find dictionaries Federico Beffa
2016-01-09 15:43 ` Alex Kost
2016-01-09 16:29 ` Alex Kost
2016-01-09 20:29 ` Leo Famulari
2016-01-10 20:48 ` Ludovic Courtès
2016-02-03 8:21 ` Ludovic Courtès
2016-02-03 9:12 ` Federico Beffa
2016-02-03 21:53 ` Ludovic Courtès
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
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).