[Nix-dev] Ruby-gems

Pjotr Prins pjotr2008 at thebird.nl
Sun Aug 3 16:40:02 CEST 2008


> I don't know if setting search paths and environment variables and all
> is possible with Ruby gems. Is there any easy documentation about it?

'gem help install' gives quite a few options - including --bindir and
--install-dir.

> In the past we have used wrapper packages for this. It would work a bit
> like this (but I don't know how it would impact Ruby things):
> 
> 1 install a package with Nix
> 2 install addons
> 3 create an expression, which takes 1 and 2 as input and creates a
> wrapper package, that combines the two packages, using environment
> variables, search paths, and so on

That works if you know the package beforehand. I think we have to
deal with 'addons' users want to install later. Most high-level
languages support this type of system: python eggs, ruby gems, perl
cpan, R modules etc. etc. By default they will install in /nix/store
where the language interpreter is installed. This causes problems.

I think the right thing to do is modify these package managers to
support Nix. 

The only other option is to allow 'addons' outside the store - as a
normal user would do under $HOME. However, how do we handle system
wide packages.

One policy would be to say:

- system wide: Use a Nix package
- user:        Under $HOME

That is the lazy option ;-).

My problem is that I want to provide Ruby to biologists, and can not
support all GEMs they will think of.

Pj.



More information about the nix-dev mailing list