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

From: Liliana Marie Prikler <[email-masked]>
Date: Sun, 15 Oct 2023 20:25:46 +0200

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