[Nix-dev] Re: Ruby-gems

Bárður Árantsson spam at scientician.net
Sun Aug 3 20:36:34 CEST 2008


Armijn Hemel wrote:
> 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.

The problem with executable wrappers is that the don't scale: You need a 
wrapper for every conceivable combination of GEMs/Eggs/whatever... which 
is impractical.

Cheers,

-- 
Bardur Arantsson
<bardurREMOVE at THISscientician.net>

The modern P4 system is like a young kid being forced to tow his
father, his grandfather, his great-grandfather, his great-great-
grandfather, his great-great-great-grandfather, some schmuck
named Sir Doink of York and a caveman named Ogg.
                            porkchop_d_clown @ http://kuro5hin.org




More information about the nix-dev mailing list