unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add zsh
@ 2014-09-07 18:15 lemonnierk
  2014-09-08 12:01 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: lemonnierk @ 2014-09-07 18:15 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 4234 bytes --]

Hi,

This is my first package, so I'd be interested to know if there is things that could be done better.
For the license, most of the files uses their own license but a few are under GPL, so I put that. Is that right, or should I
put (license (x11-style "file://LICENCE")) as suggested on irc anyway ?

From 5e9276e131e744cdf5c93ad1713236e70f80797e Mon Sep 17 00:00:00 2001
From: Kevin Lemonnier <lemonnierk@ulrar.net>
Date: Sun, 7 Sep 2014 19:56:06 +0200
Subject: [PATCH 2/2]   gnu: Add zsh

  * gnu/packages/zsh.scm: New variables.
---
 gnu/packages/zsh.scm | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)
 create mode 100644 gnu/packages/zsh.scm

diff --git a/gnu/packages/zsh.scm b/gnu/packages/zsh.scm
new file mode 100644
index 0000000..8ec6817
--- /dev/null
+++ b/gnu/packages/zsh.scm
@@ -0,0 +1,66 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2012, 2013, 2014 Kevin Lemonnier <lemonnierk@ulrar.net>
+;;;
+;;; 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 (gnu packages zsh)
+  #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages pcre)
+  #:use-module (gnu packages autotools)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix licenses))
+
+(define-public zsh
+  (package
+    (name "zsh")
+    (version "5.0.6")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "http://www.zsh.org/pub/zsh-" version
+                                 ".tar.gz"))
+             (sha256
+              (base32 "0f9y2lkv6xs5nxgj7ld7sbncy454sgamz21fm4109mxqlqa32fph"))))
+    (build-system gnu-build-system)
+    (arguments `(#:configure-flags '("--with-tcsetpgrp", "--enable-pcre")
+                 #:phases (alist-cons-before
+                           'configure 'fix-sh
+                           (lambda _
+                             (substitute*
+                                 '("configure"
+                                   "configure.ac"
+                                   "Src/exec.c"
+                                   "Src/mkmakemod.sh"
+                                   "Config/installfns.sh"
+                                   "Config/defs.mk.in"
+                                   "Test/E01options.ztst"
+                                   "Test/A05execution.ztst"
+                                   "Test/A01grammar.ztst"
+                                   "Test/B02typeset.ztst"
+                                   "Completion/Unix/Command/_init_d"
+                                   "Util/preconfig")
+                               (("/bin/sh") (which "sh"))))
+                           %standard-phases)))
+    (native-inputs `(("autoconf", autoconf)))
+    (inputs `(("ncurses", ncurses)
+              ("pcre", pcre)
+              ("perl", perl)))
+    (synopsis "Zsh is a shell designed for interactive use, although it is also a powerful scripting language")
+    (description "The Z shell (zsh) is a Unix shell that can be used as an interactive login shell and as a powerful command interpreter for shell scripting. Zsh can be thought of as an extended Bourne shell with a large number of improvements, including some features of bash, ksh, and tcsh.")
+    (home-page "http://www.zsh.org/")
+    (license gpl3)))
--
1.8.4







-- 
Kevin Lemonnier
PGP Fingerprint : C123 47CA 9E64 FCF0 3907

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] gnu: Add zsh
  2014-09-07 18:15 [PATCH] gnu: Add zsh lemonnierk
@ 2014-09-08 12:01 ` Ludovic Courtès
  2014-09-08 17:15   ` lemonnierk
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2014-09-08 12:01 UTC (permalink / raw)
  To: lemonnierk; +Cc: guix-devel

Hello,

lemonnierk@ulrar.net skribis:

> This is my first package, so I'd be interested to know if there is things that could be done better.
> For the license, most of the files uses their own license but a few are under GPL, so I put that. Is that right, or should I
> put (license (x11-style "file://LICENCE")) as suggested on irc anyway ?

It seems to me that the text in LICENSE is a slight variant on the
MIT/X11 license.  Thus, ‘x11-style’ would be appropriate.

However, LICENSE also reads this:

  However, note that certain shell functions are licensed under versions
  of the GNU General Public Licence.  Anyone distributing the shell as a
  binary including those files needs to take account of this.  Search
  shell functions for "Copyright" for specific copyright information.
  None of the core functions are affected by this, so those files may
  simply be omitted.

That effectively makes the combined work GPL, so this is what we should
put in the ‘license’ field (with a comment explaining this.)

In practice, the only file under GPL is
‘Completion/Unix/Command/_darcs’.  It’s ‘gplv2+’, to be precise.


The patch looks good to me, so I’ll just point out minor stylistic
things to change before we commit (the ‘HACKING’ file has more details
on all this.)

> From 5e9276e131e744cdf5c93ad1713236e70f80797e Mon Sep 17 00:00:00 2001
> From: Kevin Lemonnier <lemonnierk@ulrar.net>
> Date: Sun, 7 Sep 2014 19:56:06 +0200
> Subject: [PATCH 2/2]   gnu: Add zsh
                       ^
Extra space here ------’

>   * gnu/packages/zsh.scm: New variables.
  ^
Same here.  Should be “New file”.

Also make sure to add the file to gnu-system.am (see 52bd0810 as an
example.)

> +;;; Copyright © 2012, 2013, 2014 Kevin Lemonnier <lemonnierk@ulrar.net>

Just “2014”.

> +    (arguments `(#:configure-flags '("--with-tcsetpgrp", "--enable-pcre")

Extraneous comma here.

> +    (synopsis "Zsh is a shell designed for interactive use, although it is also a powerful scripting language")

It should be smaller, and not a sentence.  For instance:

  Powerful shell for interactive use and scripting

> +    (description "The Z shell (zsh) is a Unix shell that can be used as an interactive login shell and as a powerful command interpreter for shell scripting. Zsh can be thought of as an extended Bourne shell with a large number of improvements, including some features of bash, ksh, and tcsh.")

Please wrap to 72 columns.

> +    (license gpl3)))

‘gpl2+’, with the comment as discussed above.

Could you post an updated patch?

Thanks in advance, and welcome on board!  :-)

Ludo’.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gnu: Add zsh
  2014-09-08 12:01 ` Ludovic Courtès
@ 2014-09-08 17:15   ` lemonnierk
  2014-09-09  7:51     ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: lemonnierk @ 2014-09-08 17:15 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 7470 bytes --]

Thanks a lot for the feedback. Here is the new patch :

From 7352f5876a2c3942ebab92e30f659a62cd7bca7f Mon Sep 17 00:00:00 2001
From: Kevin Lemonnier <lemonnierk@ulrar.net>
Date: Mon, 8 Sep 2014 21:06:31 +0200
Subject: [PATCH] gnu: Add zsh

* gnu/packages/zsh.scm: New file
* gnu-system.am (GNU_SYSTEM_MODULES): Add it
---
 gnu-system.am        |  1 +
 gnu/packages/zsh.scm | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 71 insertions(+)
 create mode 100644 gnu/packages/zsh.scm

diff --git a/gnu-system.am b/gnu-system.am
index b3d6123..86b18b5 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -256,6 +256,7 @@ GNU_SYSTEM_MODULES =                                \
   gnu/packages/yasm.scm                                \
   gnu/packages/zile.scm                                \
   gnu/packages/zip.scm                         \
+  gnu/packages/zsh.scm                         \
                                                \
   gnu/services.scm                             \
   gnu/services/avahi.scm                       \
diff --git a/gnu/packages/zsh.scm b/gnu/packages/zsh.scm
new file mode 100644
index 0000000..77e7ccf
--- /dev/null
+++ b/gnu/packages/zsh.scm
@@ -0,0 +1,70 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2014 Kevin Lemonnier <lemonnierk@ulrar.net>
+;;;
+;;; 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 (gnu packages zsh)
+  #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages pcre)
+  #:use-module (gnu packages autotools)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix licenses))
+
+(define-public zsh
+  (package
+    (name "zsh")
+    (version "5.0.6")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "http://www.zsh.org/pub/zsh-" version
+                                 ".tar.gz"))
+             (sha256
+              (base32 "0f9y2lkv6xs5nxgj7ld7sbncy454sgamz21fm4109mxqlqa32fph"))))
+    (build-system gnu-build-system)
+    (arguments `(#:configure-flags '("--with-tcsetpgrp" "--enable-pcre")
+                 #:phases (alist-cons-before
+                           'configure 'fix-sh
+                           (lambda _
+                             (substitute*
+                                 '("configure"
+                                   "configure.ac"
+                                   "Src/exec.c"
+                                   "Src/mkmakemod.sh"
+                                   "Config/installfns.sh"
+                                   "Config/defs.mk.in"
+                                   "Test/E01options.ztst"
+                                   "Test/A05execution.ztst"
+                                   "Test/A01grammar.ztst"
+                                   "Test/B02typeset.ztst"
+                                   "Completion/Unix/Command/_init_d"
+                                   "Util/preconfig")
+                               (("/bin/sh") (which "sh"))))
+                           %standard-phases)))
+    (native-inputs `(("autoconf", autoconf)))
+    (inputs `(("ncurses", ncurses)
+              ("pcre", pcre)
+              ("perl", perl)))
+    (synopsis "Powerful shell for interactive use and scripting")
+    (description "The Z shell (zsh) is a Unix shell that can be used
+as an interactive login shell and as a powerful command interpreter
+for shell scripting. Zsh can be thought of as an extended Bourne shell
+with a large number of improvements, including some features of bash,
+ksh, and tcsh.")
+    (home-page "http://www.zsh.org/")
+    (license gpl2+)))
--
1.8.4



On Mon, Sep 08, 2014 at 02:01:01PM +0200, Ludovic Courtès wrote:
> Hello,
> 
> lemonnierk@ulrar.net skribis:
> 
> > This is my first package, so I'd be interested to know if there is things that could be done better.
> > For the license, most of the files uses their own license but a few are under GPL, so I put that. Is that right, or should I
> > put (license (x11-style "file://LICENCE")) as suggested on irc anyway ?
> 
> It seems to me that the text in LICENSE is a slight variant on the
> MIT/X11 license.  Thus, ‘x11-style’ would be appropriate.
> 
> However, LICENSE also reads this:
> 
>   However, note that certain shell functions are licensed under versions
>   of the GNU General Public Licence.  Anyone distributing the shell as a
>   binary including those files needs to take account of this.  Search
>   shell functions for "Copyright" for specific copyright information.
>   None of the core functions are affected by this, so those files may
>   simply be omitted.
> 
> That effectively makes the combined work GPL, so this is what we should
> put in the ‘license’ field (with a comment explaining this.)
> 
> In practice, the only file under GPL is
> ‘Completion/Unix/Command/_darcs’.  It’s ‘gplv2+’, to be precise.
> 
> 
> The patch looks good to me, so I’ll just point out minor stylistic
> things to change before we commit (the ‘HACKING’ file has more details
> on all this.)
> 
> > From 5e9276e131e744cdf5c93ad1713236e70f80797e Mon Sep 17 00:00:00 2001
> > From: Kevin Lemonnier <lemonnierk@ulrar.net>
> > Date: Sun, 7 Sep 2014 19:56:06 +0200
> > Subject: [PATCH 2/2]   gnu: Add zsh
>                        ^
> Extra space here ------’
> 
> >   * gnu/packages/zsh.scm: New variables.
>   ^
> Same here.  Should be “New file”.
> 
> Also make sure to add the file to gnu-system.am (see 52bd0810 as an
> example.)
> 
> > +;;; Copyright © 2012, 2013, 2014 Kevin Lemonnier <lemonnierk@ulrar.net>
> 
> Just “2014”.
> 
> > +    (arguments `(#:configure-flags '("--with-tcsetpgrp", "--enable-pcre")
> 
> Extraneous comma here.
> 
> > +    (synopsis "Zsh is a shell designed for interactive use, although it is also a powerful scripting language")
> 
> It should be smaller, and not a sentence.  For instance:
> 
>   Powerful shell for interactive use and scripting
> 
> > +    (description "The Z shell (zsh) is a Unix shell that can be used as an interactive login shell and as a powerful command interpreter for shell scripting. Zsh can be thought of as an extended Bourne shell with a large number of improvements, including some features of bash, ksh, and tcsh.")
> 
> Please wrap to 72 columns.
> 
> > +    (license gpl3)))
> 
> ‘gpl2+’, with the comment as discussed above.
> 
> Could you post an updated patch?
> 
> Thanks in advance, and welcome on board!  :-)
> 
> Ludo’.

-- 
Kevin Lemonnier
PGP Fingerprint : C123 47CA 9E64 FCF0 3907

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] gnu: Add zsh
  2014-09-08 17:15   ` lemonnierk
@ 2014-09-09  7:51     ` Ludovic Courtès
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2014-09-09  7:51 UTC (permalink / raw)
  To: lemonnierk; +Cc: guix-devel

lemonnierk@ulrar.net skribis:

> From 7352f5876a2c3942ebab92e30f659a62cd7bca7f Mon Sep 17 00:00:00 2001
> From: Kevin Lemonnier <lemonnierk@ulrar.net>
> Date: Mon, 8 Sep 2014 21:06:31 +0200
> Subject: [PATCH] gnu: Add zsh
>
> * gnu/packages/zsh.scm: New file
> * gnu-system.am (GNU_SYSTEM_MODULES): Add it

Applied with an additional comment above the ‘license’ field, as
discussed.

Thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-09-09  7:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-07 18:15 [PATCH] gnu: Add zsh lemonnierk
2014-09-08 12:01 ` Ludovic Courtès
2014-09-08 17:15   ` lemonnierk
2014-09-09  7:51     ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).