all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#29686: gnu: aspell: Do not ignore GuixOS system profile.
@ 2017-12-13  6:43 Oleg Pykhalov
  2017-12-13 21:52 ` Ludovic Courtès
  2019-10-17 13:04 ` Pierre Neidhardt
  0 siblings, 2 replies; 12+ messages in thread
From: Oleg Pykhalov @ 2017-12-13  6:43 UTC (permalink / raw)
  To: 29686

[-- Attachment #1: Type: text/plain, Size: 1358 bytes --]

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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-11-14 21:40 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-13  6:43 bug#29686: gnu: aspell: Do not ignore GuixOS system profile Oleg Pykhalov
2017-12-13 21:52 ` Ludovic Courtès
2017-12-20 13:14   ` Ludovic Courtès
2017-12-20 14:47     ` Oleg Pykhalov
2017-12-20 20:55       ` Ludovic Courtès
2019-11-13 17:51         ` Ludovic Courtès
2019-11-14 11:22           ` Pierre Neidhardt
2019-11-14 21:39             ` Ludovic Courtès
2019-10-17 13:04 ` Pierre Neidhardt
2019-10-26 11:02   ` Pierre Neidhardt
2019-10-27 22:31     ` Ludovic Courtès
2019-10-28  7:42       ` Pierre Neidhardt

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.