[Nix-dev] Ruby-gems

Armijn Hemel armijn at uulug.nl
Sun Aug 3 20:22:52 CEST 2008


hi Pjotr,

> > 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.

Hm. I disagree there, but yes, there should be some solution.

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

Or provide good Nix expressions that can work with these package
managers. We do this with more things. Wrappers are often not too hard
to make.

> 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.

I still think that a wrapper that is a combination of Ruby plus all the
gems you need for a certain package would be sufficient. Maybe we should
just sit together for a few hours to just see if we can get it fixed
without too much effort.

armijn

-- 
-------------------------------------------------------------------------
armijn at uulug.nl | http://www.uulug.nl/ | UULug: Utrecht Linux Users Group
-------------------------------------------------------------------------




More information about the nix-dev mailing list