From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pjotr Prins Subject: Re: [PATCH] Add yaggo. Date: Wed, 24 Jun 2015 07:51:37 +0200 Message-ID: <20150624055137.GA29505@thebird.nl> References: <558A3377.6060301@uq.edu.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55468) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7dbj-0003Dx-Ob for guix-devel@gnu.org; Wed, 24 Jun 2015 01:52:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z7dbf-0005th-3b for guix-devel@gnu.org; Wed, 24 Jun 2015 01:52:23 -0400 Received: from mail.thebird.nl ([95.154.246.10]:33263) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7dbe-0005tQ-UA for guix-devel@gnu.org; Wed, 24 Jun 2015 01:52:19 -0400 Content-Disposition: inline In-Reply-To: <558A3377.6060301@uq.edu.au> 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: Ben Woodcroft Cc: "guix-devel@gnu.org" On Wed, Jun 24, 2015 at 02:35:03PM +1000, Ben Woodcroft wrote: > Actually, I lie, this patch only sort of works. The issue is that it > only works when a ruby package is also installed, GEM_PATH does not > get set as part of the ruby-build-system for yaggo. The lib/ files > are copied to what I gather is the correct place, but the env isn't > right. > > The same also appears to be true of other ruby packages e.g. ruby-hoe: > $ guix package -i ruby-hoe > .. > ben@u:~/git/guix$ guix package --search-paths > warning: failed to install locale: Invalid argument > export PATH="/home/ben/.guix-profile/bin:/home/ben/.guix-profile/sbin" > export PYTHONPATH="/home/ben/.guix-profile/lib/python3.4/site-packages" > export PKG_CONFIG_PATH="/home/ben/.guix-profile/lib/pkgconfig:/home/ben/.guix-profile/share/pkgconfig" > export GUILE_LOAD_PATH="/home/ben/.guix-profile/share/guile/site/2.0" > export GUILE_LOAD_COMPILED_PATH="/home/ben/.guix-profile/share/guile/site/2.0" > export CPATH="/home/ben/.guix-profile/include" > export LIBRARY_PATH="/home/ben/.guix-profile/lib" > export ACLOCAL_PATH="/home/ben/.guix-profile/share/aclocal" > > i.e. no GEM_PATH entry, hence: That is correct. The Ruby support system is still in development. Adding the GEM_PATH is on the books as well as GEM_HOME and GEM_SPEC_CACHE to have the gem and rspec tools work also outside GNU Guix. At the moment we are working on native gems (i.e. those that contain C code). I am also planning for a rubygem-build-system which would allow us to include gems with very simple package definitions, e.g., rather then (define-public ruby-i18n (package (name "ruby-i18n") (version "0.6.11") (source (origin (method url-fetch) (uri (string-append "https://github.com/svenfuchs/i18n/archive/v" version ".tar.gz")) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "1fdhnhh1p5g8vibv44d770z8nq208zrms3m2nswdvr54072y1m6k")))) (build-system ruby-build-system) (synopsis "Internationalization library for Ruby") (...) we get (define-public ruby-i18n (package (name "ruby-i18n") (version "0.6.11") (source (origin (method gem-fetch) (file-name (string-append name "-" version ".gem")) (sha256 (base32 "1fdhnhh1p5g8vibv44d770z8nq208zrms3m2nswdvr54072y1m6k")))) (build-system rubygem-build-system) (synopsis "Internationalization library for Ruby") (...) which would install directly from rubygems.org (including contained dependencies when missing in the existing environment). This would greatly facilitate adding Ruby gems to guix. To get to this stage I need to better understand the guix source base, something I am working on right now. For now you can add the GEM_PATH with my script. It works for locating installed gems and installing new ones in the right place. No need for rvm and friends this way (native gems also build): https://github.com/pjotrp/guix-notes/blob/master/scripts/ruby-guix-env If you run Ruby 2.2.2 you may want to update the paths to reflect that. Pj.