GNU bug report logs - #39311
[PATCH] gnu: Add guix-vim.

Previous Next

Package: guix-patches;

Reported by: Efraim Flashner <efraim <at> flashner.co.il>

Date: Mon, 27 Jan 2020 17:22:01 UTC

Severity: normal

Tags: patch

Done: Efraim Flashner <efraim <at> flashner.co.il>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 39311 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Efraim Flashner <efraim <at> flashner.co.il>
Cc: 39311 <at> debbugs.gnu.org
Subject: Re: [bug#39311] [PATCH] gnu: Add guix-vim.
Date: Mon, 27 Jan 2020 23:28:20 +0100
Hi Efraim,

> * gnu/packages/vim.scm (guix-vim): New variable.
> ---
>  gnu/packages/vim.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 42 insertions(+)
>
> diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
> index b5952e3e21..a2d715dc1c 100644
> --- a/gnu/packages/vim.scm
> +++ b/gnu/packages/vim.scm
> @@ -938,3 +938,45 @@ through its msgpack-rpc API.")
>  
>  (define-public python2-pynvim
>    (package-with-python2 python-pynvim))
> +
> +(define-public guix-vim

Looks like we usually prefix vim extensions with “vim-”, so should this
be “vim-guix” instead…?

> +         (replace 'install
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let* ((out (assoc-ref outputs "out"))
> +                    (vimfiles (string-append out "/share/vim/vimfiles"))
> +                    (compiler (string-append vimfiles "/compiler"))
> +                    (doc      (string-append vimfiles "/doc"))
> +                    (indent   (string-append vimfiles "/indent"))
> +                    (ftdetect (string-append vimfiles "/ftdetect"))
> +                    (ftplugin (string-append vimfiles "/ftplugin"))
> +                    (syntax   (string-append vimfiles "/syntax")))
> +               (copy-recursively "compiler" compiler)
> +               (copy-recursively "doc" doc)
> +               (copy-recursively "indent" indent)
> +               (copy-recursively "ftdetect" ftdetect)
> +               (copy-recursively "ftplugin" ftplugin)
> +               (copy-recursively "syntax" syntax)
> +               #t))))))

The repetition here tickles me a little.  How about this instead…?

(for-each (lambda (dir)
           (copy-recursively dir (string-append vimfiles "/" dir)))
          '("compiler" "doc" "indent" "ftdetect" "ftplugin" "syntax"))

-- 
Ricardo




This bug report was last modified 5 years and 115 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.