Subject: bug#29686: closed (Re: bug#29686: gnu: aspell: Do not ignore GuixOS system profile.)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 14 Nov 2019 21:40:02 +0000

Your bug report

#29686: gnu: aspell: Do not ignore GuixOS system profile.

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
29686: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=29686
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#29686: gnu: aspell: Do not ignore GuixOS system profile.
From: Ludovic Courtès <[email-masked]>
To: Pierre Neidhardt <[email-masked]>
Cc: Oleg Pykhalov <[email-masked]>, [email-masked]
Date: Thu, 14 Nov 2019 22:39:41 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

Pierre Neidhardt <[email-masked]> skribis:

> Looks good to me, thanks for working on this!

Pushed as 4554d6b77e0f306a3dc33a8c1f68c9a302967a08 (core-updates).

Thank you!

Ludo’.

Subject: gnu: aspell: Do not ignore GuixOS system profile.
From: Oleg Pykhalov <[email-masked]>
To: [email-masked]
Date: Wed, 13 Dec 2017 09:43:19 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

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.