GNU bug report logs - #31989
vim-build-system

Previous Next

Package: guix-patches;

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

Date: Wed, 27 Jun 2018 20:06:01 UTC

Severity: normal

Tags: moreinfo, patch

Merged with 30385

Done: zimoun <zimon.toutoune <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 31989 in the body.
You can then email your comments to 31989 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#31989; Package guix-patches. (Wed, 27 Jun 2018 20:06:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Efraim Flashner <efraim <at> flashner.co.il>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 27 Jun 2018 20:06:02 GMT) Full text and rfc822 format available.

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

From: Efraim Flashner <efraim <at> flashner.co.il>
To: guix-patches <at> gnu.org
Subject: vim-build-system
Date: Wed, 27 Jun 2018 23:04:54 +0300
[Message part 1 (text/plain, inline)]
This patch got forgotten about a year ago

-- 
Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[Message part 2 (message/rfc822, inline)]
From: ng0 <ng0 <at> infotropique.org>
To: Efraim Flashner <efraim <at> flashner.co.il>, guix-devel <at> gnu.org
Subject: Re: PATCH in need for discussion: vim-build-system
Date: Sun, 2 Jul 2017 19:56:07 +0000
[Message part 3 (text/plain, inline)]
ng0 transcribed 1.3K bytes:
> I found the mistake, a simple typo. Updated patch coming soon.

That would've been too easy, but there was a typo.
-- 
ng0
GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
GnuPG: https://n0is.noblogs.org/my-keys
https://www.infotropique.org https://krosos.org
[0001-build-system-Add-vim-build-system.patch (text/plain, attachment)]
[0002-gnu-vim-neocomplete-Use-vim-build-system.patch (text/plain, attachment)]
[signature.asc (application/pgp-signature, inline)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#31989; Package guix-patches. (Thu, 28 Jun 2018 04:57:02 GMT) Full text and rfc822 format available.

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

From: Nils Gillmann <ng0 <at> n0.is>
To: Efraim Flashner <efraim <at> flashner.co.il>
Cc: 31989 <at> debbugs.gnu.org
Subject: Re: [bug#31989] vim-build-system
Date: Thu, 28 Jun 2018 04:56:53 +0000
Efraim Flashner transcribed 16K bytes:
> This patch got forgotten about a year ago
> 
> -- 
> Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
> GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
> Confidentiality cannot be guaranteed on emails sent or received unencrypted

> Date: Sun, 2 Jul 2017 19:56:07 +0000
> From: ng0 <ng0 <at> infotropique.org>
> To: Efraim Flashner <efraim <at> flashner.co.il>, guix-devel <at> gnu.org
> Subject: Re: PATCH in need for discussion: vim-build-system
> 
> ng0 transcribed 1.3K bytes:
> > I found the mistake, a simple typo. Updated patch coming soon.
> 
> That would've been too easy, but there was a typo.

hm... right, July 2017. Time flies.
I think I'll look at the differences and fix it.

So here's something with regards to the 'test' phase:
it seems like the few packages using tests, use a Makefile.
When it is a rare exception, does it still count as part
of the system? We would run gnu's make there.

> -- 
> ng0
> GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
> GnuPG: https://n0is.noblogs.org/my-keys
> https://www.infotropique.org https://krosos.org

> From 1596e2ca4b9d237359287e35a65acdfd99a48879 Mon Sep 17 00:00:00 2001
> From: ng0 <ng0 <at> infotropique.org>
> Date: Sun, 2 Jul 2017 16:07:48 +0000
> Subject: [PATCH 1/2] build-system: Add 'vim-build-system'.
> 
> * Makefile.am (MODULES): Add 'guix/build-system/vim.scm' and
> 'guix/build/vim-build-system.scm'.
> * guix/build-system/vim.scm: New file.
> * guix/build/vim-build-system.scm: New file.
> ---
>  Makefile.am                     |   2 +
>  guix/build-system/vim.scm       | 127 ++++++++++++++++++++++++++++++++++++++++
>  guix/build/vim-build-system.scm |  70 ++++++++++++++++++++++
>  3 files changed, 199 insertions(+)
>  create mode 100644 guix/build-system/vim.scm
>  create mode 100644 guix/build/vim-build-system.scm
> 
> diff --git a/Makefile.am b/Makefile.am
> index f6059d94b..cb36bd849 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -85,6 +85,7 @@ MODULES =					\
>    guix/build-system/perl.scm			\
>    guix/build-system/python.scm			\
>    guix/build-system/ocaml.scm			\
> +  guix/build-system/vim.scm                     \
>    guix/build-system/waf.scm			\
>    guix/build-system/r.scm			\
>    guix/build-system/ruby.scm			\
> @@ -106,6 +107,7 @@ MODULES =					\
>    guix/build/emacs-build-system.scm		\
>    guix/build/font-build-system.scm		\
>    guix/build/asdf-build-system.scm		\
> +  guix/build/vim-build-system.scm               \
>    guix/build/git.scm				\
>    guix/build/hg.scm				\
>    guix/build/glib-or-gtk-build-system.scm	\
> diff --git a/guix/build-system/vim.scm b/guix/build-system/vim.scm
> new file mode 100644
> index 000000000..b3f9831c0
> --- /dev/null
> +++ b/guix/build-system/vim.scm
> @@ -0,0 +1,127 @@
> +;;; GNU Guix --- Functional package management for GNU
> +;;; Copyright © 2017 ng0 <ng0 <at> infotropique.org>
> +;;;
> +;;; This file is part of GNU Guix.
> +;;;
> +;;; GNU Guix is free software; you can redistribute it and/or modify it
> +;;; under the terms of the GNU General Public License as published by
> +;;; the Free Software Foundation; either version 3 of the License, or (at
> +;;; your option) any later version.
> +;;;
> +;;; GNU Guix is distributed in the hope that it will be useful, but
> +;;; WITHOUT ANY WARRANTY; without even the implied warranty of
> +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +;;; GNU General Public License for more details.
> +;;;
> +;;; You should have received a copy of the GNU General Public License
> +;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
> +
> +(define-module (guix build-system vim)
> +  #:use-module (guix utils)
> +  #:use-module (guix packages)
> +  #:use-module (guix derivations)
> +  #:use-module (guix search-paths)
> +  #:use-module (guix build-system gnu)
> +  #:use-module (ice-9 match)
> +  #:export (%vim-build-system-modules
> +            vim-build
> +            vim-build-system))
> +
> +;; Commentary:
> +;;
> +;; Standard build procedure for vim packages.  This is
> +;; implemented as an extension of 'gnu-build-system'.
> +;;
> +;; Code:
> +
> +(define %vim-build-system-modules
> +  ;; Build-side modules imported by default.
> +  `((guix build vim-build-system)
> +    ,@%gnu-build-system-modules))
> +
> +(define* (lower name
> +                #:key source inputs native-inputs outputs system target
> +                #:allow-other-keys
> +                #:rest arguments)
> +  "Return a bag for NAME."
> +  (define private-keywords
> +    '(#:target #:inputs #:native-inputs))
> +
> +  (bag
> +    (name name)
> +    (system system)
> +    (host-inputs `(,@(if source
> +                         `(("source" ,source))
> +                         '())
> +                   ,@inputs
> +                   ,(list "tar" (module-ref (resolve-interface '(gnu packages base)) 'tar))
> +                   ,@(let ((compression (resolve-interface '(gnu packages compression))))
> +                       (map (match-lambda
> +                              ((name package)
> +                               (list name (module-ref compression package))))
> +                            `(("gzip" gzip)
> +                              ("bzip2" bzip2)
> +                              ("unzip" unzip)
> +                              ("xz" xz))))))
> +    (build-inputs native-inputs)
> +    (outputs outputs)
> +    (build vim-build)
> +    (arguments (strip-keyword-arguments private-keywords arguments))))
> +
> +(define* (vim-build store name inputs
> +                     #:key source
> +                     (tests? #t)
> +                     (test-target "test")
> +                     (configure-flags ''())
> +                     (phases '(@ (guix build vim-build-system)
> +                                 %standard-phases))
> +                     (outputs '("out"))
> +                     (search-paths '())
> +                     (system (%current-system))
> +                     (guile #f)
> +                     (imported-modules %vim-build-system-modules)
> +                     (modules '((guix build vim-build-system)
> +                                (guix build utils))))
> +  "Build SOURCE with INPUTS."
> +  (define builder
> +    `(begin
> +       (use-modules ,@modules)
> +       (vim-build #:name ,name
> +                   #:source ,(match (assoc-ref inputs "source")
> +                               (((? derivation? source))
> +                                (derivation->output-path source))
> +                               ((source)
> +                                source)
> +                               (source
> +                                source))
> +                   #:configure-flags ,configure-flags
> +                   #:system ,system
> +                   #:test-target ,test-target
> +                   #:tests? ,tests?
> +                   #:phases ,phases
> +                   #:outputs %outputs
> +                   #:search-paths ',(map search-path-specification->sexp
> +                                         search-paths)
> +                   #:inputs %build-inputs)))
> +
> +  (define guile-for-build
> +    (match guile
> +      ((? package?)
> +       (package-derivation store guile system #:graft? #f))
> +      (#f                                         ; the default
> +       (let* ((distro (resolve-interface '(gnu packages commencement)))
> +              (guile  (module-ref distro 'guile-final)))
> +         (package-derivation store guile system #:graft? #f)))))
> +
> +  (build-expression->derivation store name builder
> +                                #:inputs inputs
> +                                #:system system
> +                                #:modules imported-modules
> +                                #:outputs outputs
> +                                #:guile-for-build guile-for-build))
> +
> +(define vim-build-system
> +  (build-system
> +    (name 'vim)
> +    (description "The build system for vim packages")
> +    (lower lower)))
> diff --git a/guix/build/vim-build-system.scm b/guix/build/vim-build-system.scm
> new file mode 100644
> index 000000000..ca863cef8
> --- /dev/null
> +++ b/guix/build/vim-build-system.scm
> @@ -0,0 +1,70 @@
> +;;; GNU Guix --- Functional package management for GNU
> +;;; Copyright © 2017 ng0 <ng0 <at> infotropique.org>
> +;;;
> +;;; This file is part of GNU Guix.
> +;;;
> +;;; GNU Guix is free software; you can redistribute it and/or modify it
> +;;; under the terms of the GNU General Public License as published by
> +;;; the Free Software Foundation; either version 3 of the License, or (at
> +;;; your option) any later version.
> +;;;
> +;;; GNU Guix is distributed in the hope that it will be useful, but
> +;;; WITHOUT ANY WARRANTY; without even the implied warranty of
> +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +;;; GNU General Public License for more details.
> +;;;
> +;;; You should have received a copy of the GNU General Public License
> +;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
> +
> +(define-module (guix build vim-build-system)
> +  #:use-module ((guix build gnu-build-system) #:prefix gnu:)
> +  #:use-module (guix build utils)
> +  #:use-module (srfi srfi-1)
> +  #:use-module (srfi srfi-26)
> +  #:export (%standard-phases
> +            vim-build))
> +
> +;; Commentary:
> +;;
> +;; Builder-side code of the build procedure for vim packages.
> +;;
> +;; Code:
> +
> +(define gnu:unpack (assoc-ref gnu:%standard-phases 'unpack))
> +
> +(define* (unpack #:key source #:allow-other-keys)
> +  "Unpack SOURCE into the build directory.  SOURCE may be a compressed
> +archive, a directory or a '.vim' file."
> +  (if (any (cut string-suffix? <> source)
> +           (list ".vim" ".vital"))
> +      (begin
> +        (mkdir "source")
> +        (chdir "source")
> +        (copy-file source (strip-store-file-name source))
> +        #t)
> +      (gnu:unpack #:source source)))
> +
> +(define* (install #:key outputs #:allow-other-keys)
> +  "Install the package contents."
> +  (let* ((out (assoc-ref outputs "out"))
> +         (source (getcwd))
> +         (vimfiles (string-append out "/share/vim/vimfiles")))
> +    (lambda (dir)
> +      (when (file-exists? dir)
> +        (copy-recursively dir (string-append vimfiles "/" dir))))
> +    (list "autoload" "after" "doc" "ftdetect" "ftplugin"
> +          "indent" "plugin" "rplugin" "syntax")
> +    #t))
> +
> +(define %standard-phases
> +  (modify-phases gnu:%standard-phases
> +    (replace 'unpack unpack)
> +    (delete 'configure)
> +    (delete 'check)
> +    (delete 'build)
> +    (replace 'install install)))
> +
> +(define* (vim-build #:key inputs (phases %standard-phases)
> +                      #:allow-other-keys #:rest args)
> +  "Build the given vim package, applying all of PHASES in order."
> +  (apply gnu:gnu-build #:inputs inputs #:phases phases args))
> -- 
> 2.13.2
> 

> From bb8cf78af6569d2fc9beb1d766d6d748c488e012 Mon Sep 17 00:00:00 2001
> From: ng0 <ng0 <at> infotropique.org>
> Date: Sun, 2 Jul 2017 16:11:19 +0000
> Subject: [PATCH 2/2] gnu: vim-neocomplete: Use 'vim-build-system'.
> 
> * gnu/packages/vim.scm (vim-neocomplete): Switch to 'vim-build-system'.
> ---
>  gnu/packages/vim.scm | 22 +++-------------------
>  1 file changed, 3 insertions(+), 19 deletions(-)
> 
> diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
> index 27c0b0da9..5672fab69 100644
> --- a/gnu/packages/vim.scm
> +++ b/gnu/packages/vim.scm
> @@ -1,7 +1,7 @@
>  ;;; GNU Guix --- Functional package management for GNU
>  ;;; Copyright © 2013 Cyril Roelandt <tipecaml <at> gmail.com>
>  ;;; Copyright © 2016 Efraim Flashner <efraim <at> flashner.co.il>
> -;;; Copyright © 2016, 2017 ng0 <ng0 <at> no-reply.pragmatique.xyz>
> +;;; Copyright © 2016, 2017 ng0 <ng0 <at> infotropique.org>
>  ;;; Copyright © 2017 Ricardo Wurmus <rekado <at> elephly.net>
>  ;;; Copyright © 2017 Marius Bakke <mbakke <at> fastmail.com>
>  ;;;
> @@ -28,6 +28,7 @@
>    #:use-module (guix git-download)
>    #:use-module (guix build-system cmake)
>    #:use-module (guix build-system gnu)
> +  #:use-module (guix build-system vim)
>    #:use-module (gnu packages)
>    #:use-module (gnu packages acl)
>    #:use-module (gnu packages admin) ; For GNU hostname
> @@ -195,24 +196,7 @@ configuration files.")
>         (sha256
>          (base32
>           "1307gbrdwam2akq9w2lpijc41740i4layk2qkd9sjkqxfch5lni2"))))
> -    (build-system gnu-build-system)
> -    (arguments
> -     `(#:tests? #f
> -       #:phases
> -       (modify-phases %standard-phases
> -         (delete 'configure)
> -         (delete 'build)
> -         (replace 'install
> -           (lambda* (#:key outputs #:allow-other-keys)
> -             (let* ((out (assoc-ref outputs "out"))
> -                    (vimfiles (string-append out "/share/vim/vimfiles"))
> -                    (autoload (string-append vimfiles "/autoload"))
> -                    (doc (string-append vimfiles "/doc"))
> -                    (plugin (string-append vimfiles "/plugin")))
> -               (copy-recursively "autoload" autoload)
> -               (copy-recursively "doc" doc)
> -               (copy-recursively "plugin" plugin)
> -               #t))))))
> +    (build-system vim-build-system)
>      (synopsis "Next generation completion framework for Vim")
>      (description
>       "@code{neocomplete}, an abbreviation of 'neo-completion with cache',
> -- 
> 2.13.2
> 










Merged 30385 31989. Request was from Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de> to control <at> debbugs.gnu.org. (Mon, 02 Jul 2018 21:27:01 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#31989; Package guix-patches. (Wed, 24 Nov 2021 23:48:03 GMT) Full text and rfc822 format available.

Message #13 received at 31989-done <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: Efraim Flashner <efraim <at> flashner.co.il>
Cc: 31989-done <at> debbugs.gnu.org, 30385-done <at> debbugs.gnu.org
Subject: Re: [bug#31989] vim-build-system
Date: Thu, 25 Nov 2021 00:45:20 +0100
Hi,

On Wed, 27 Jun 2018 at 23:04, Efraim Flashner <efraim <at> flashner.co.il> wrote:
> This patch got forgotten about a year ago
>
> --
> Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
> GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
> Confidentiality cannot be guaranteed on emails sent or received unencrypted
>
> From: ng0 <ng0 <at> infotropique.org>
> Subject: Re: PATCH in need for discussion: vim-build-system
> To: Efraim Flashner <efraim <at> flashner.co.il>, guix-devel <at> gnu.org
> Date: Sun, 2 Jul 2017 19:56:07 +0000 (4 years, 20 weeks, 5 days ago)
> Mail-Followup-To: Efraim Flashner <efraim <at> flashner.co.il>, guix-devel <at> gnu.org
>
> ng0 transcribed 1.3K bytes:
>> I found the mistake, a simple typo. Updated patch coming soon.
>
> That would've been too easy, but there was a typo.

This is marked as moreinfo since 2018.  After reading the thread, I am
closing because Vim users do not seem to manifest an interest for having
vim-build-system.

If I misread something, feel free to reopen.  It appears to me better to
still keep close this one, and send a fresh set of patches to review.

Cheers,
simon




Information forwarded to guix-patches <at> gnu.org:
bug#31989; Package guix-patches. (Fri, 26 Nov 2021 11:15:02 GMT) Full text and rfc822 format available.

Message #16 received at 31989-done <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: 31989-done <at> debbugs.gnu.org, 30385-done <at> debbugs.gnu.org
Subject: Re: [bug#31989] vim-build-system
Date: Fri, 26 Nov 2021 13:13:38 +0200
[Message part 1 (text/plain, inline)]
On Thu, Nov 25, 2021 at 12:45:20AM +0100, zimoun wrote:
> Hi,
> 
> On Wed, 27 Jun 2018 at 23:04, Efraim Flashner <efraim <at> flashner.co.il> wrote:
> > This patch got forgotten about a year ago
> >
> > --
> > Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
> > GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
> > Confidentiality cannot be guaranteed on emails sent or received unencrypted
> >
> > From: ng0 <ng0 <at> infotropique.org>
> > Subject: Re: PATCH in need for discussion: vim-build-system
> > To: Efraim Flashner <efraim <at> flashner.co.il>, guix-devel <at> gnu.org
> > Date: Sun, 2 Jul 2017 19:56:07 +0000 (4 years, 20 weeks, 5 days ago)
> > Mail-Followup-To: Efraim Flashner <efraim <at> flashner.co.il>, guix-devel <at> gnu.org
> >
> > ng0 transcribed 1.3K bytes:
> >> I found the mistake, a simple typo. Updated patch coming soon.
> >
> > That would've been too easy, but there was a typo.
> 
> This is marked as moreinfo since 2018.  After reading the thread, I am
> closing because Vim users do not seem to manifest an interest for having
> vim-build-system.
> 
> If I misread something, feel free to reopen.  It appears to me better to
> still keep close this one, and send a fresh set of patches to review.
> 
> Cheers,
> simon

We do pretty well with the copy-build-system, with the occasional extra
phase(s).

-- 
Efraim Flashner   <efraim <at> flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 26 Dec 2021 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 83 days ago.

Previous Next


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