Subject: [bug#66562] [PATCH v3] gnu: emacs-haskell-snippets: Use correct directory for snippets.

From: Rostislav Svoboda <[email-masked]>
Date: Mon, 16 Oct 2023 12:57:35 +0200

Hi Liliana,

Your patch works (thank you) and I improved it a tiny bit. (See
attachment.) BTW shouldn't the revision number in the (git-version
"0.1.0" "1" commit) be increased to "2" in your patch and to "3" in
mine?

Cheers

Le dim. 15 oct. 2023 à 20:36, Liliana Marie Prikler
<[email-masked]> a écrit :
>
> This package instructs Yasnippet to look for snippets relative to its own
> path.  However, it installs the snippets directly to site-lisp, which as of
> 79cfe30f3eb10bd3dbf7aa0f6e873c945d7d0ea5 is one directory above that.  Use the
> elpa-directory procedure introduced in that commit to rectify this mistake.
>
> * gnu/packages/emacs-xyz.scm (emacs-haskell-snippets)[#:phases]
> <install-snippets>: Use elpa-directory.
>
> Fixes: 66562
> ---
> Hi Rostislav,
>
> Am Sonntag, dem 15.10.2023 um 17:17 +0200 schrieb Rostislav Svoboda:
> > * gnu/packages/emacs-xyz.scm (emacs-haskell-snippets): Fix
> > haskell-snippets-dir value
> >
> > The value of haskell-snippets-dir was:
> >   /gnu/store/*-emacs-haskell-snippets-*/share/emacs/site-lisp/haskell-snippets-*/
> > It needs to be:
> >   /gnu/store/*-emacs-haskell-snippets-*/share/emacs/site-lisp/
> Actually, emacs-haskell-snippets is doing something wrong when installing files
> directy to site-lisp instead of any other directory.  Here's an attempt to fix
> that.
>
> Cheers
>
>  gnu/packages/emacs-xyz.scm | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
> index bb8c25f9b5..7f55febfbb 100644
> --- a/gnu/packages/emacs-xyz.scm
> +++ b/gnu/packages/emacs-xyz.scm
> @@ -35546,10 +35546,11 @@ (define-public emacs-haskell-snippets
>          #:phases
>          #~(modify-phases %standard-phases
>              (add-after 'install 'install-snippets
> -              (lambda _
> +              (lambda* (#:key outputs #:allow-other-keys)
>                  (let ((snippets
>                         (string-append
> -                        #$output "/share/emacs/site-lisp/snippets/haskell-mode")))
> +                        (elpa-directory (assoc-ref outputs "out"))
> +                        "/snippets/haskell-mode")))
>                    (mkdir-p snippets)
>                    (copy-recursively "snippets/haskell-mode" snippets)))))))
>        (propagated-inputs
>
> base-commit: ef026e68fe58ed3be216c76f7c5f008893ed3095
> --
> 2.41.0
>