Nix dev environment for ruby


#1

Hi,

I am trying to manage my dev ruby environment with Nix.
My problem is that I need to use ruby-2.5.0 and the current ruby-2.5 in nixpkgs is 2.5.1.

I tried to create a new derivation from https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/interpreters/ruby/default.nix, ruby_2_5, but I don’t know how to access generic function.

Any suggestions?

Thanks


#2

From what I see the generic function is not accessible.however I have tried to use different Ruby versions before and needed to easily use new ones as well. That’s why I have this now: https://github.com/bobvanderlinden/nixpkgs-ruby

2.5.0 should be accessible and buildable as well. Check the readme for more info.


#3

Thanks for the that. However, I struggle to see how you use the base ruby package. I thought it was simple customising a standard package passing a different ruby version somehow.
I tried with overrideAttrs with no luck. Why is rubyVersion available and generic is not?