buildRubyGem: ensure gem versions don't get misparsed

Without this, every nix-env --upgrade replaces ruby with an
arbitrary gem, which makes Ruby unusuable from user environments.
This commit is contained in:
Nathan Zadoks 2016-02-07 16:39:39 +01:00
parent 75739fd05b
commit b4da3bb88b

View File

@ -32,7 +32,9 @@ lib.makeOverridable (
, platform ? "ruby"
, ruby ? defs.ruby
, stdenv ? ruby.stdenv
, namePrefix ? "${ruby.name}" + "-"
, namePrefix ? (let
rubyName = builtins.parseDrvName ruby.name;
in "${rubyName.name}${rubyName.version}-")
, buildInputs ? []
, doCheck ? false
, meta ? {}