From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Ruby install Date: Mon, 05 May 2014 10:03:30 +0200 Message-ID: <87wqe0ps8d.fsf@gnu.org> References: <20140504175144.GA28798@thebird.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60451) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WhDsA-0007M7-HW for guix-devel@gnu.org; Mon, 05 May 2014 04:03:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WhDs6-00044U-Ag for guix-devel@gnu.org; Mon, 05 May 2014 04:03:38 -0400 Received: from hera.aquilenet.fr ([2a01:474::1]:34124) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WhDs5-00044A-Sn for guix-devel@gnu.org; Mon, 05 May 2014 04:03:34 -0400 In-Reply-To: <20140504175144.GA28798@thebird.nl> (Pjotr Prins's message of "Sun, 4 May 2014 19:51:44 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Pjotr Prins Cc: guix-devel Hi, Pjotr, Pjotr Prins skribis: > I have a working Ruby installation at > > https://gitorious.org/guix/pjotrps-guix/source/61d21fad72d49cbbf0135b5a= c7362bb0f64167fa:gnu/packages/ruby.scm > > This is my first GUIX package (I have written Nix packages before), so > please have a look. Overall looks good to me! A couple of comments: 59. (substitute* (filter file-exists? 60. '(=20 61. "ext/readline/readline.c" 62. )) Here we can assume that the file exists I believe, so the =E2=80=98filter= =E2=80=99 call can be removed. 67. (substitute* (filter file-exists? 68. '( 69. "configure" 70. "configure.in" 71. "Makefile.in" 72. "ext/pty/pty.c" 73. "io.c" 74. "lib/mkmf.rb" 75. "process.c" 76. "test/rubygems/test_gem_ext_configure_bui= lder.rb" 77. "test/rdoc/test_rdoc_parser.rb" 78. "test/ruby/test_rubyoptions.rb" 79. "test/ruby/test_process.rb" 80. "test/ruby/test_system.rb" 81. "tool/rbinstall.rb" 82. "tool/config.guess" 83. )) 84. (("/bin/sh") (which "sh")))) Likewise. In addition, I think only the .rb and .c files need to be patched, since the others are already handled automatically, normally. (In the future please send it as an in-line patch.) > I intend to patch rubygems so gems get installed in a $HOME dir > specifically named after the SHA. This will accomodate people who just > want to use rubygems. > > I am also going to add particalur gems to GUIX, each going into its > own expression. That will be a bit tricky because I don't want > Rubygems to install dependencies. Not sure how the Nix guys did it, so > I will study that. It may be helpful to have a =E2=80=98ruby-build-system=E2=80=99, akin to =E2=80=98python-build-system=E2=80=99 but with the right incantations (info= "(guix) Build Systems"). > Do we have a HOWTO on how to run expressions in the Guile debugger? > Never used that and would like to see how individual statements > evaluate in LISP. Basically there are two approaches. From the command line, like this: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guile GNU Guile 2.0.11.20-4338f Copyright (C) 1995-2014 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter `,help' for help. scheme@(guile-user)> ,use (gnu packages python) scheme@(guile-user)> ,use (guix) scheme@(guile-user)> (define s (open-connection)) scheme@(guile-user)> python $1 =3D # scheme@(guile-user)> (package-derivation s python) $2 =3D # /gnu/store/ij8xgynicdmnzb7pzmyb6bqi17s0ll3y-python-3.3.5 3f4fdc0> scheme@(guile-user)> (build-derivations s (list $2)) $3 =3D #t --8<---------------cut here---------------end--------------->8--- But the best thing, if you use Emacs, is to use Geiser, as noted in =E2=80=98HACKING=E2=80=99. In addition to a REPL, it brings stuff like aut= odoc, jump-to-definition, expression evaluation from the buffer, etc. > I am really impressed with GUIX, and I think it is a no-brainer to use > a real functional programming language for this. Thanks Ludo and > others! I just wish I could use GUIX on servers where I don't have (and > won't get) root access. Or is there a way? With Nix I could run as a > normal user. It=E2=80=99s the same as Nix, which means that if the daemon cannot run as = root, then it=E2=80=99s usable in a =E2=80=9Cdegraded=E2=80=9D mode (info "(guix)= Build Environment Setup"). HTH, Ludo=E2=80=99.