all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Thompson <dthompson2@worcester.edu>
To: guix-devel@gnu.org
Subject: Re: [PATCH] build: ruby: Patch executables to set necessary gem load path.
Date: Sat, 07 Mar 2015 19:45:00 -0500	[thread overview]
Message-ID: <87vbic2u7n.fsf@fsf.org> (raw)
In-Reply-To: <871tl04aux.fsf@fsf.org>

David Thompson <dthompson2@worcester.edu> writes:

> This patch addresses the issue of how to ensure that Ruby executables
> are able to load all of the additional Ruby libraries that they need in
> order to work: with a new 'patch-executables' build phase.  Instead of
> using wrap-program, I instead take advantage of the wrappers that the
> 'gem' command already creates for Ruby executables.  There's guaranteed
> to be a line in which the executable's host gem is loaded that looks
> like `gem 'foo', version`.  I simply insert a Ruby code snippet above it
> that adds all of the necessary gems to the 'Gem.path' array.
>
> Users of Ruby programs must still apply the $GEM_PATH suggested by 'guix
> package --search-paths' in order for the gem that the executable belongs
> to (the gem that they explicitly installed) to be found.  I think this
> is reasonable and much like how you must set the proper load paths for
> Guile programs to work.

I can see that this won't be enough for any application whose Ruby gem
dependency tree is deeper than 1.  I suppose I could use the transitive
inputs of the package, which would get everything, but that feels a bit
ugly.  More thought needed...

-- 
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate

  reply	other threads:[~2015-03-08  0:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-08  0:00 [PATCH] build: ruby: Patch executables to set necessary gem load path David Thompson
2015-03-08  0:45 ` David Thompson [this message]
2015-03-09 22:19   ` Ludovic Courtès
2015-03-09 22:18 ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vbic2u7n.fsf@fsf.org \
    --to=dthompson2@worcester.edu \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.