unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: add the rc shell package
@ 2015-07-10  1:02 Jeff Mickey
  2015-07-10 13:59 ` Ricardo Wurmus
  2015-07-11  5:12 ` Mark H Weaver
  0 siblings, 2 replies; 14+ messages in thread
From: Jeff Mickey @ 2015-07-10  1:02 UTC (permalink / raw)
  To: guix-devel

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

Hi guix-devel!

I've never contributed a patch to guix, so please let me know if I'm
missing any prerequisites for contribution.

This adds the rc shell to guix.

  //  jeff mickey


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gnu add the rc shell package --]
[-- Type: text/x-patch, Size: 2448 bytes --]

From 5deadfb23d8235101220310d0c47626c1d4c219f Mon Sep 17 00:00:00 2001
From: Jeff Mickey <j@codemac.net>
Date: Thu, 9 Jul 2015 17:39:42 -0700
Subject: [PATCH] gnu: add the rc shell package

* gnu/packages/rc.scm (rc): Add the rc package definition

This patch adds the rc shell package to guix. It is byron's rc, not plan9 rc -
and on other distributions 'rc' refers to byron's rc and 'plan9port' or some
other meta package install the plan9 set of tools which includes rc.

It has a zlib license.
---
 gnu/packages/rc.scm | 44 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 gnu/packages/rc.scm

diff --git a/gnu/packages/rc.scm b/gnu/packages/rc.scm
new file mode 100644
index 0000000..6fc001c
--- /dev/null
+++ b/gnu/packages/rc.scm
@@ -0,0 +1,44 @@
+(define-module (gnu packages rc)
+  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages readline)
+  #:use-module (guix build gnu-build-system)
+  #:use-module (guix build utils)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix download)
+  #:use-module (guix licenses)
+  #:use-module (guix packages))
+
+
+(define-public rc
+  (package
+    (name "rc")
+    (version "1.7.4")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/rakitzis/rc/tarball/"
+                                  "c884da53a7c885d46ace2b92de78946855b18e92"))
+              (sha256
+               (base32 "05hlnqcxaw08m1xypk733hajwaap5pr354ndmrm86k0flisjk0fw"))))
+    (build-system gnu-build-system)
+    (arguments `(#:configure-flags
+		 '("--with-edit=gnu")
+		 #:phases
+		 (modify-phases %standard-phases
+		   (add-before 'configure 'autoreconf (lambda _
+							(zero? (system* "autoreconf" "-vfi")))))
+		 #:tests? #f))
+    (inputs `(("readline" ,readline)
+	      ("perl" ,perl)))
+    (native-inputs `(("autoconf" ,autoconf)
+		     ("automake" ,automake)
+		     ("libtool" ,libtool)
+		     ("pkg-config" ,pkg-config)))
+    (synopsis "An alternative implementation of the plan 9 rc shell.")
+    (description
+     "This is a reimplementation for Unix, by Byron Rakitzis, of
+the Plan 9 shell. It has a small feature set similar to a traditional Bourne
+shell, but with a much cleaner and simpler syntax.")
+    (home-page "http://github.com/rakitzis/rc")
+    (license zlib)))
-- 
2.4.5


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

* Re: [PATCH] gnu: add the rc shell package
  2015-07-10  1:02 [PATCH] gnu: add the rc shell package Jeff Mickey
@ 2015-07-10 13:59 ` Ricardo Wurmus
  2015-07-10 22:27   ` Jeff Mickey
  2015-07-11  5:12 ` Mark H Weaver
  1 sibling, 1 reply; 14+ messages in thread
From: Ricardo Wurmus @ 2015-07-10 13:59 UTC (permalink / raw)
  To: Jeff Mickey; +Cc: guix-devel

Hi Jeff,

thanks for the contribution!  Below are some comments about your patch,
mostly relating to formatting.

> From 5deadfb23d8235101220310d0c47626c1d4c219f Mon Sep 17 00:00:00 2001
> From: Jeff Mickey <j@codemac.net>
> Date: Thu, 9 Jul 2015 17:39:42 -0700
> Subject: [PATCH] gnu: add the rc shell package
>
> * gnu/packages/rc.scm (rc): Add the rc package definition
>
> This patch adds the rc shell package to guix. It is byron's rc, not plan9 rc -
> and on other distributions 'rc' refers to byron's rc and 'plan9port' or some
> other meta package install the plan9 set of tools which includes rc.
>
> It has a zlib license.

We usually don’t add comments like that to the commit message (instead
they go into the cover email to the mailing list).  Also, when creating
a new file we don’t name the variable that is added, but declare this
file to be new.

I wonder if for this shell we could have a common module called
“shells.scm” where we could merge in “zsh.scm” and possibly other
shells.  Anyway, here would be a commit message that is more in line
with the others:

~~~8<~~~~
gnu: Add the rc shell.

* gnu/packages/rc.scm: New file.
~~~8<~~~~

> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append "https://github.com/rakitzis/rc/tarball/"
> +                                  "c884da53a7c885d46ace2b92de78946855b18e92"))
> +              (sha256
> +               (base32 "05hlnqcxaw08m1xypk733hajwaap5pr354ndmrm86k0flisjk0fw"))))

I see that there are no release tarballs.  When we take an arbitrary
commit we usually add a comment.  Also, we normally use the ‘git-fetch’
method instead of ‘url-fetch’.

> +    (build-system gnu-build-system)
> +    (arguments `(#:configure-flags
> +		 '("--with-edit=gnu")
> +		 #:phases
> +		 (modify-phases %standard-phases
> +		   (add-before 'configure 'autoreconf (lambda _
> +							(zero? (system* "autoreconf" "-vfi")))))
> +		 #:tests? #f))

Please add a comment to explain why the tests are disabled (no “check”
target or failing tests?).  The alignment and length of the lines makes
it hard to read.  How about this instead:

    (arguments
     `(#:tests? #f ;no "check" target
       #:configure-flags '("--with-edit=gnu")
       #:phases
       (modify-phases %standard-phases
         (add-before
          'configure 'autoreconf
          (lambda _ (zero? (system* "autoreconf" "-vfi")))))))

> +    (inputs `(("readline" ,readline)
> +	      ("perl" ,perl)))

This is oddly aligned.

> +    (native-inputs `(("autoconf" ,autoconf)
> +		     ("automake" ,automake)
> +		     ("libtool" ,libtool)
> +		     ("pkg-config" ,pkg-config)))

Same here.

> +    (synopsis "An alternative implementation of the plan 9 rc shell.")
> +    (description
> +     "This is a reimplementation for Unix, by Byron Rakitzis, of
> +the Plan 9 shell. It has a small feature set similar to a traditional Bourne
> +shell, but with a much cleaner and simpler syntax.")

Please use two spaces after a period.

I’m not sure if the description is okay; “much cleaner and simpler
syntax” sounds a little too partial to me.

Note that you can use “guix lint” to check your package definition for
the most common problems.

~~ Ricardo

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

* Re: [PATCH] gnu: add the rc shell package
  2015-07-10 13:59 ` Ricardo Wurmus
@ 2015-07-10 22:27   ` Jeff Mickey
  2015-07-11  4:37     ` Ricardo Wurmus
  0 siblings, 1 reply; 14+ messages in thread
From: Jeff Mickey @ 2015-07-10 22:27 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

* Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> [2015-07-10 06:59]:
> Please add a comment to explain why the tests are disabled (no “check”
> target or failing tests?).

The tests are written in an m4 file which generates a configure script
that generates c main()'s that are compiled and run as tests against
rc.. there was a /bin/pwd in there that failed the test and I didn't
think a simple sed would be able to remove that part of the test.

I will include an explanation in my followup.

> The alignment and length of the lines makes it hard to read.  How
> about this instead:
[...]

Yea - I think emacs must not be loading the right scheme settings from
.dir-locals.el for some reason, any pointers to a "blessed config" or
style guide would be awesome.

Thanks for the review - the comments were very helpful and I'll be
updating the package shortly!

  //  codemac

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

* Re: [PATCH] gnu: add the rc shell package
  2015-07-10 22:27   ` Jeff Mickey
@ 2015-07-11  4:37     ` Ricardo Wurmus
  0 siblings, 0 replies; 14+ messages in thread
From: Ricardo Wurmus @ 2015-07-11  4:37 UTC (permalink / raw)
  To: Jeff Mickey; +Cc: guix-devel@gnu.org

> The tests are written in an m4 file which generates a configure script
> that generates c main()'s that are compiled and run as tests against
> rc.. there was a /bin/pwd in there that failed the test and I didn't
> think a simple sed would be able to remove that part of the test.

You can use

    (substitute* "the-file.c"
      (("/bin/pwd") (which "pwd")))

to replace the “/bin/pwd” with the “pwd” in the store.

To run the tests by some other means than “make check” you can simply
replace the ‘check’ phase.

~~ Ricardo

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

* Re: [PATCH] gnu: add the rc shell package
  2015-07-10  1:02 [PATCH] gnu: add the rc shell package Jeff Mickey
  2015-07-10 13:59 ` Ricardo Wurmus
@ 2015-07-11  5:12 ` Mark H Weaver
  2015-07-12  0:57   ` Jeff Mickey
  1 sibling, 1 reply; 14+ messages in thread
From: Mark H Weaver @ 2015-07-11  5:12 UTC (permalink / raw)
  To: Jeff Mickey; +Cc: guix-devel

Jeff Mickey <j@codemac.net> writes:
> I've never contributed a patch to guix, so please let me know if I'm
> missing any prerequisites for contribution.

To add to the feedback provided by Ricardo: your new file rc.scm should
contain the same large header as the other files, with your copyright
notice.

    Thanks,
      Mark

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

* Re: [PATCH] gnu: add the rc shell package
  2015-07-11  5:12 ` Mark H Weaver
@ 2015-07-12  0:57   ` Jeff Mickey
  2015-07-12  2:18     ` Mark H Weaver
  0 siblings, 1 reply; 14+ messages in thread
From: Jeff Mickey @ 2015-07-12  0:57 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

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

Thank you so much for the kind and prompt feedback folks!

Here is my updated patch, let me know if I've addressed your concerns.

  //  codemac


[-- Attachment #2: 0001-gnu-add-the-rc-shell-package.patch --]
[-- Type: text/x-patch, Size: 3748 bytes --]

From 85e9fef8f3eec0b434c909627cd68d5584597aa0 Mon Sep 17 00:00:00 2001
From: Jeff Mickey <j@codemac.net>
Date: Thu, 9 Jul 2015 17:39:42 -0700
Subject: [PATCH] gnu: add the rc shell package

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

diff --git a/gnu/packages/rc.scm b/gnu/packages/rc.scm
new file mode 100644
index 0000000..6bd2b51
--- /dev/null
+++ b/gnu/packages/rc.scm
@@ -0,0 +1,77 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.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 (gnu packages rc)
+  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages readline)
+  #:use-module (guix build gnu-build-system)
+  #:use-module (guix build utils)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix download)
+  #:use-module (guix git-download)
+  #:use-module (guix licenses)
+  #:use-module (guix packages))
+
+(define-public rc
+  (package
+    (name "rc")
+    (version "1.7.4")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "git://github.com/rakitzis/rc.git")
+                    ;; commit name 'release: rc-1.7.4'
+                    (commit "c884da53a7c885d46ace2b92de78946855b18e92")))
+              (sha256
+               (base32
+                "00mgzvrrh9w96xa85g4gjbsvq02f08k4jwjcdnxq7kyh5xgiw95l"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags
+       '("--with-edit=gnu")
+       #:phases
+       (modify-phases %standard-phases
+         (add-before
+          'configure 'autoreconf
+          (lambda _ (zero? (system* "autoreconf" "-vfi"))))
+         (add-before
+          'autoreconf 'rewrite-paths
+          (lambda _
+            (substitute* "trip.rc"
+              (("/bin/pwd") (which "pwd"))
+              (("/bin/sh") (which "sh")))))
+         ;; this removes a single test which checks that for sure rm is in
+         ;; /bin/rm
+         (add-after
+          'rewrite-paths 'patch-triprc
+          (lambda _ (zero? (system* "sed" "-i" "282,284d" "trip.rc")))))
+       #:tests? #t)) ;; trip.rc explicity tests for /bin
+    (inputs `(("readline" ,readline)
+              ("perl" ,perl)))
+    (native-inputs `(("autoconf" ,autoconf)
+                     ("automake" ,automake)
+                     ("libtool" ,libtool)
+                     ("pkg-config" ,pkg-config)))
+    (synopsis "An alternative implementation of the plan 9 rc shell.")
+    (description
+     "This is a reimplementation for Unix, by Byron Rakitzis, of the Plan 9
+shell.  It has a small feature set similar to a traditional Bourne shell.")
+    (home-page "http://github.com/rakitzis/rc")
+    (license zlib)))
-- 
2.4.5


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

* Re: [PATCH] gnu: add the rc shell package
  2015-07-12  0:57   ` Jeff Mickey
@ 2015-07-12  2:18     ` Mark H Weaver
  2015-07-12  5:35       ` Jeff Mickey
  0 siblings, 1 reply; 14+ messages in thread
From: Mark H Weaver @ 2015-07-12  2:18 UTC (permalink / raw)
  To: Jeff Mickey; +Cc: guix-devel

Jeff Mickey <j@codemac.net> writes:

> From 85e9fef8f3eec0b434c909627cd68d5584597aa0 Mon Sep 17 00:00:00 2001
> From: Jeff Mickey <j@codemac.net>
> Date: Thu, 9 Jul 2015 17:39:42 -0700
> Subject: [PATCH] gnu: add the rc shell package

Please make the first summary line:

  gnu: Add rc.

> * gnu/packages/rc.scm: New file.

When adding new files, you need to add an associated line to
'GNU_SYSTEM_MODULES' in gnu-system.am.  Please keep that list sorted.
Then you can add this line to the commit log below the other one:

* gnu-system.am (GNU_SYSTEM_MODULES): Add it.

> ---
>  gnu/packages/rc.scm | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 77 insertions(+)
>  create mode 100644 gnu/packages/rc.scm
>
> diff --git a/gnu/packages/rc.scm b/gnu/packages/rc.scm
> new file mode 100644
> index 0000000..6bd2b51
> --- /dev/null
> +++ b/gnu/packages/rc.scm
> @@ -0,0 +1,77 @@
> +;;; GNU Guix --- Functional package management for GNU
> +;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>

Please remove Ludovic's copyright line and add your own.

> +;;;
> +;;; 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 rc)
> +  #:use-module (gnu packages autotools)
> +  #:use-module (gnu packages perl)
> +  #:use-module (gnu packages pkg-config)
> +  #:use-module (gnu packages readline)
> +  #:use-module (guix build gnu-build-system)
> +  #:use-module (guix build utils)

You don't need (guix build gnu-build-system) or (guix build utils).

> +  #:use-module (guix build-system gnu)
> +  #:use-module (guix download)

You don't need (guix download) either.

> +  #:use-module (guix git-download)
> +  #:use-module (guix licenses)
> +  #:use-module (guix packages))
> +
> +(define-public rc
> +  (package
> +    (name "rc")
> +    (version "1.7.4")
> +    (source (origin
> +              (method git-fetch)
> +              (uri (git-reference
> +                    (url "git://github.com/rakitzis/rc.git")
> +                    ;; commit name 'release: rc-1.7.4'
> +                    (commit "c884da53a7c885d46ace2b92de78946855b18e92")))

Please add the following field to the 'origin' form, so that the source
code directory in /gnu/store will have a more descriptive name:

              (file-name (string-append name "-" version "-checkout"))

> +              (sha256
> +               (base32
> +                "00mgzvrrh9w96xa85g4gjbsvq02f08k4jwjcdnxq7kyh5xgiw95l"))))
> +    (build-system gnu-build-system)
> +    (arguments
> +     `(#:configure-flags
> +       '("--with-edit=gnu")
> +       #:phases
> +       (modify-phases %standard-phases
> +         (add-before
> +          'configure 'autoreconf

The 'autoreconf' phase should go after 'unpack', rather than before
'configure'.  The reason is that there are some other phases between
'unpack' and 'configure' that will patch things in the generated files,
and those things tend to be important on non-Intel platforms.

> +          (lambda _ (zero? (system* "autoreconf" "-vfi"))))
> +         (add-before
> +          'autoreconf 'rewrite-paths
> +          (lambda _
> +            (substitute* "trip.rc"
> +              (("/bin/pwd") (which "pwd"))
> +              (("/bin/sh") (which "sh")))))

Phase procedures should return a boolean indicating whether the phase
was successfull.  'substitute*' returns an unspecified value.
Therefore, you should add #t after the call to 'substitute*'.

Also, it would be nice to line up right-hand-sides.

> +         ;; this removes a single test which checks that for sure rm is in
> +         ;; /bin/rm
> +         (add-after
> +          'rewrite-paths 'patch-triprc
> +          (lambda _ (zero? (system* "sed" "-i" "282,284d" "trip.rc")))))

Editing the file by removing certain line numbers is too brittle.  When
this package is updated, lines 282-284 may correspond to a different
area of the code, causing it to silently remove the wrong lines.

Also, since both of these phases are patching trip.rc, how about
combining them into one phase?  How about something like this?

--8<---------------cut here---------------start------------->8---
         (add-before
          'autoreconf 'patch-trip.rc
          (lambda _
            (substitute* "trip.rc"
              (("/bin/pwd") (which "pwd"))
              (("/bin/sh")  (which "sh"))
              (("/bin/rm")  (which "rm"))
              (("/bin\\)")  (string-append (dirname (which "rm")) ")")))
            #t)))))
--8<---------------cut here---------------end--------------->8---

This will keep this test intact, but patch it so that it expects 'rm' to
be found where it is located in /gnu/store rather than in /bin.

> +       #:tests? #t)) ;; trip.rc explicity tests for /bin

Please remove the #:tests? #t, since that is the default.  I guess this
comment is outdated also.

> +    (inputs `(("readline" ,readline)
> +              ("perl" ,perl)))
> +    (native-inputs `(("autoconf" ,autoconf)
> +                     ("automake" ,automake)
> +                     ("libtool" ,libtool)
> +                     ("pkg-config" ,pkg-config)))
> +    (synopsis "An alternative implementation of the plan 9 rc shell.")

By convention, the synopsis has no period at the end (since it is not a
sentence), and no article at the beginning.  If you run "guix lint rc"
it will warn you about these issues, and some other problems as well.
How about this instead:

  (synopsis "Alternative implementation of the plan 9 rc shell")

> +    (description
> +     "This is a reimplementation for Unix, by Byron Rakitzis, of the Plan 9

s/Unix/POSIX/

> +shell.  It has a small feature set similar to a traditional Bourne shell.")
> +    (home-page "http://github.com/rakitzis/rc")
> +    (license zlib)))

Can you send an updated patch?

     Thanks,
       Mark

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

* Re: [PATCH] gnu: add the rc shell package
  2015-07-12  2:18     ` Mark H Weaver
@ 2015-07-12  5:35       ` Jeff Mickey
  2015-07-12 22:46         ` Jeff Mickey
  0 siblings, 1 reply; 14+ messages in thread
From: Jeff Mickey @ 2015-07-12  5:35 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

* Mark H Weaver <mhw@netris.org> [2015-07-11 19:18]:

[...]
>> +    (description
>> +     "This is a reimplementation for Unix, by Byron Rakitzis, of the Plan 9
>
> s/Unix/POSIX/

This builds and runs in plenty of non-POSIX environments, Plan 9 being
the obvious one. This reimplementation is actually more a slight syntax
change than a build environment change.. Should I change it to something
like:

An alternate implementation of the rc shell by Byron Rakitzis

I'm including Byron's name because some people know this shell as
"byron's shell".

Thank you for all of your notes, and I will send an updated patch
soon. I've been having trouble running guix lint but will spend more
time getting that working before sending another patch.

  //  mickey

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

* Re: [PATCH] gnu: add the rc shell package
  2015-07-12  5:35       ` Jeff Mickey
@ 2015-07-12 22:46         ` Jeff Mickey
  2015-07-13  3:15           ` Mark H Weaver
  2015-07-13  6:51           ` Alex Kost
  0 siblings, 2 replies; 14+ messages in thread
From: Jeff Mickey @ 2015-07-12 22:46 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

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

Updated patch below. Thank you again for all your help.

And does this list prefer 'inline' or 'attachment' patches?

  //  codemac


[-- Attachment #2: 0001-gnu-Add-rc.patch --]
[-- Type: text/x-patch, Size: 3981 bytes --]

From 795a244571b9c19da5624556d6b0afec1d1f0ac5 Mon Sep 17 00:00:00 2001
From: Jeff Mickey <j@codemac.net>
Date: Thu, 9 Jul 2015 17:39:42 -0700
Subject: [PATCH] gnu: Add rc.

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

diff --git a/gnu-system.am b/gnu-system.am
index d6369b5..5da002d 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -256,6 +256,7 @@ GNU_SYSTEM_MODULES =				\
   gnu/packages/qemu.scm				\
   gnu/packages/qt.scm				\
   gnu/packages/ratpoison.scm			\
+  gnu/packages/rc.scm				\
   gnu/packages/rdesktop.scm			\
   gnu/packages/rdf.scm				\
   gnu/packages/readline.scm			\
diff --git a/gnu/packages/rc.scm b/gnu/packages/rc.scm
new file mode 100644
index 0000000..1baace6
--- /dev/null
+++ b/gnu/packages/rc.scm
@@ -0,0 +1,72 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2015 Jeff Mickey <j@codemac.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 rc)
+  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages readline)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix git-download)
+  #:use-module (guix licenses)
+  #:use-module (guix packages))
+
+(define-public rc
+  (package
+    (name "rc")
+    (version "1.7.4")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "git://github.com/rakitzis/rc.git")
+                    ;; commit name 'release: rc-1.7.4'
+                    (commit "c884da53a7c885d46ace2b92de78946855b18e92")))
+              (sha256
+               (base32
+                "00mgzvrrh9w96xa85g4gjbsvq02f08k4jwjcdnxq7kyh5xgiw95l"))
+              (file-name (string-append name "-" version "-checkout"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags
+       '("--with-edit=gnu")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after
+          'unpack 'autoreconf
+          (lambda _ (zero? (system* "autoreconf" "-vfi"))))
+         (add-before
+          'autoreconf 'patch-trip.rc
+          (lambda _
+            (substitute* "trip.rc"
+              (("/bin/pwd") (which "pwd"))
+              (("/bin/sh")  (which "sh"))
+              (("/bin/rm")  (which "rm"))
+              (("/bin\\)")  (string-append (dirname (which "rm")) ")")))
+            #t)))))
+    (inputs `(("readline" ,readline)
+              ("perl" ,perl)))
+    (native-inputs `(("autoconf" ,autoconf)
+                     ("automake" ,automake)
+                     ("libtool" ,libtool)
+                     ("pkg-config" ,pkg-config)))
+    (synopsis "Alternative implementation of the rc shell by Byron Rakitzis")
+    (description
+     "This is a reimplementation for Unix, by Byron Rakitzis, of the Plan 9
+shell.  It has a small feature set similar to a traditional Bourne shell.")
+    (home-page "http://github.com/rakitzis/rc")
+    (license zlib)))
-- 
2.4.5


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

* Re: [PATCH] gnu: add the rc shell package
  2015-07-12 22:46         ` Jeff Mickey
@ 2015-07-13  3:15           ` Mark H Weaver
  2015-07-13 20:22             ` Jeff Mickey
  2015-07-13  6:51           ` Alex Kost
  1 sibling, 1 reply; 14+ messages in thread
From: Mark H Weaver @ 2015-07-13  3:15 UTC (permalink / raw)
  To: Jeff Mickey; +Cc: guix-devel

Jeff Mickey <j@codemac.net> writes:
> And does this list prefer 'inline' or 'attachment' patches?

I don't have a preference.

The updated patch looks good except for one problem: the description
still says "This is a reimplementation for Unix".  Here, we are working
on GNU, which stands for "GNU's Not Unix".  UNIX is a trademark, and
does not apply to our system.  If you want to say something like this,
please use the name "POSIX" instead.  If that's too narrow, then perhaps
it is better to remove this statement entirely.

     Mark

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

* Re: [PATCH] gnu: add the rc shell package
  2015-07-12 22:46         ` Jeff Mickey
  2015-07-13  3:15           ` Mark H Weaver
@ 2015-07-13  6:51           ` Alex Kost
  2015-07-13 17:14             ` Ludovic Courtès
  1 sibling, 1 reply; 14+ messages in thread
From: Alex Kost @ 2015-07-13  6:51 UTC (permalink / raw)
  To: Jeff Mickey; +Cc: guix-devel

Jeff Mickey (2015-07-13 01:46 +0300) wrote:

> +    (home-page "http://github.com/rakitzis/rc")

A question to the list: Do we prefer "https" over "http" for such github
home pages?  I see that both variants are used, but is there a
preferable way?

-- 
Alex

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

* Re: [PATCH] gnu: add the rc shell package
  2015-07-13  6:51           ` Alex Kost
@ 2015-07-13 17:14             ` Ludovic Courtès
  0 siblings, 0 replies; 14+ messages in thread
From: Ludovic Courtès @ 2015-07-13 17:14 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel

Alex Kost <alezost@gmail.com> skribis:

> Jeff Mickey (2015-07-13 01:46 +0300) wrote:
>
>> +    (home-page "http://github.com/rakitzis/rc")
>
> A question to the list: Do we prefer "https" over "http" for such github
> home pages?  I see that both variants are used, but is there a
> preferable way?

I tend to use ‘http’ rather than ‘https’ (on the grounds that Tor does a
better job than TLS at protecting user privacy, and that authentication
based on X.509 certificates is not so helpful), but no strong preference
on my side.

Ludo’.

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

* Re: [PATCH] gnu: add the rc shell package
  2015-07-13  3:15           ` Mark H Weaver
@ 2015-07-13 20:22             ` Jeff Mickey
  2015-07-13 23:34               ` Mark H Weaver
  0 siblings, 1 reply; 14+ messages in thread
From: Jeff Mickey @ 2015-07-13 20:22 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

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

Here's another attempt, removed references to Unix.

  //  codemac


[-- Attachment #2: 0001-gnu-Add-rc.patch --]
[-- Type: text/x-patch, Size: 3970 bytes --]

From 9f05fc85c77184403fd2393eb7edb21d68276d72 Mon Sep 17 00:00:00 2001
From: Jeff Mickey <j@codemac.net>
Date: Thu, 9 Jul 2015 17:39:42 -0700
Subject: [PATCH] gnu: Add rc.

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

diff --git a/gnu-system.am b/gnu-system.am
index d6369b5..5da002d 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -256,6 +256,7 @@ GNU_SYSTEM_MODULES =				\
   gnu/packages/qemu.scm				\
   gnu/packages/qt.scm				\
   gnu/packages/ratpoison.scm			\
+  gnu/packages/rc.scm				\
   gnu/packages/rdesktop.scm			\
   gnu/packages/rdf.scm				\
   gnu/packages/readline.scm			\
diff --git a/gnu/packages/rc.scm b/gnu/packages/rc.scm
new file mode 100644
index 0000000..d3edf9e
--- /dev/null
+++ b/gnu/packages/rc.scm
@@ -0,0 +1,72 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2015 Jeff Mickey <j@codemac.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 rc)
+  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages readline)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix git-download)
+  #:use-module (guix licenses)
+  #:use-module (guix packages))
+
+(define-public rc
+  (package
+    (name "rc")
+    (version "1.7.4")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "git://github.com/rakitzis/rc.git")
+                    ;; commit name 'release: rc-1.7.4'
+                    (commit "c884da53a7c885d46ace2b92de78946855b18e92")))
+              (sha256
+               (base32
+                "00mgzvrrh9w96xa85g4gjbsvq02f08k4jwjcdnxq7kyh5xgiw95l"))
+              (file-name (string-append name "-" version "-checkout"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags
+       '("--with-edit=gnu")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after
+          'unpack 'autoreconf
+          (lambda _ (zero? (system* "autoreconf" "-vfi"))))
+         (add-before
+          'autoreconf 'patch-trip.rc
+          (lambda _
+            (substitute* "trip.rc"
+              (("/bin/pwd") (which "pwd"))
+              (("/bin/sh")  (which "sh"))
+              (("/bin/rm")  (which "rm"))
+              (("/bin\\)")  (string-append (dirname (which "rm")) ")")))
+            #t)))))
+    (inputs `(("readline" ,readline)
+              ("perl" ,perl)))
+    (native-inputs `(("autoconf" ,autoconf)
+                     ("automake" ,automake)
+                     ("libtool" ,libtool)
+                     ("pkg-config" ,pkg-config)))
+    (synopsis "Alternative implementation of the rc shell by Byron Rakitzis")
+    (description
+     "This is a reimplementation by Byron Rakitzis of the Plan 9 shell.  It
+has a small feature set similar to a traditional Bourne shell.")
+    (home-page "http://github.com/rakitzis/rc")
+    (license zlib)))
-- 
2.4.5


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

* Re: [PATCH] gnu: add the rc shell package
  2015-07-13 20:22             ` Jeff Mickey
@ 2015-07-13 23:34               ` Mark H Weaver
  0 siblings, 0 replies; 14+ messages in thread
From: Mark H Weaver @ 2015-07-13 23:34 UTC (permalink / raw)
  To: Jeff Mickey; +Cc: guix-devel

Jeff Mickey <j@codemac.net> writes:
> Here's another attempt, removed references to Unix.
>
>   //  codemac
>
>
> From 9f05fc85c77184403fd2393eb7edb21d68276d72 Mon Sep 17 00:00:00 2001
> From: Jeff Mickey <j@codemac.net>
> Date: Thu, 9 Jul 2015 17:39:42 -0700
> Subject: [PATCH] gnu: Add rc.

Pushed, thanks!

     Mark

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

end of thread, other threads:[~2015-07-13 23:34 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-10  1:02 [PATCH] gnu: add the rc shell package Jeff Mickey
2015-07-10 13:59 ` Ricardo Wurmus
2015-07-10 22:27   ` Jeff Mickey
2015-07-11  4:37     ` Ricardo Wurmus
2015-07-11  5:12 ` Mark H Weaver
2015-07-12  0:57   ` Jeff Mickey
2015-07-12  2:18     ` Mark H Weaver
2015-07-12  5:35       ` Jeff Mickey
2015-07-12 22:46         ` Jeff Mickey
2015-07-13  3:15           ` Mark H Weaver
2015-07-13 20:22             ` Jeff Mickey
2015-07-13 23:34               ` Mark H Weaver
2015-07-13  6:51           ` Alex Kost
2015-07-13 17:14             ` 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).