Nix dev environment for ruby


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 nixpkgs/default.nix at master · NixOS/nixpkgs · GitHub, ruby_2_5, but I don’t know how to access generic function.

Any suggestions?


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: GitHub - bobvanderlinden/nixpkgs-ruby: A Nix repository with all Ruby versions being kept up-to-date automatically

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

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?