--- Begin Message ---
Subject: |
gnu: aspell: Do not ignore GuixOS system profile. |
Date: |
Wed, 13 Dec 2017 09:43:19 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Hello Guix,
Currently, if aspell is installed in GuixOS system profile and not in
user profile then aspell cannot find dictionaries.
(define-public aspell
(package
;; …
(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\"}")))))))))
;; …
))
I have a solution on top of existing wrapper, but what is a good way to
implement the following?
--8<---------------cut here---------------start------------->8---
LIB_ASPELL=lib/aspell
HOME_PROFILE=$HOME/.guix-profile
SYSTEM_PROFILE=/run/current-system/profile
if [ -z ${GUIX_PROFILE} ]; then
if [ -d $HOME_PROFILE/$LIB_ASPELL ]; then
GUIX_PROFILE=$HOME_PROFILE
elif [ -d $SYSTEM_PROFILE/$LIB_ASPELL ]; then
GUIX_PROFILE=$SYSTEM_PROFILE
fi
fi
export ASPELL_CONF="${ASPELL_CONF:-"dict-dir ${GUIX_PROFILE}/lib/aspell"}"
--8<---------------cut here---------------end--------------->8---
Thanks,
Oleg.
signature.asc
Description: PGP signature
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#29686: gnu: aspell: Do not ignore GuixOS system profile. |
Date: |
Thu, 14 Nov 2019 22:39:41 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Hi,
Pierre Neidhardt <address@hidden> skribis:
> Looks good to me, thanks for working on this!
Pushed as 4554d6b77e0f306a3dc33a8c1f68c9a302967a08 (core-updates).
Thank you!
Ludo’.
--- End Message ---