Merge pull request #12866 from nathan7/rubygem-drvname-fix

buildRubyGem: ensure gem versions don't get misparsed
This commit is contained in:
zimbatm 2016-02-23 23:13:12 +00:00
commit cdbaee7d4b

View file

@ -32,7 +32,9 @@ lib.makeOverridable (
, platform ? "ruby" , platform ? "ruby"
, ruby ? defs.ruby , ruby ? defs.ruby
, stdenv ? ruby.stdenv , stdenv ? ruby.stdenv
, namePrefix ? "${ruby.name}" + "-" , namePrefix ? (let
rubyName = builtins.parseDrvName ruby.name;
in "${rubyName.name}${rubyName.version}-")
, buildInputs ? [] , buildInputs ? []
, doCheck ? false , doCheck ? false
, meta ? {} , meta ? {}
@ -89,7 +91,7 @@ stdenv.mkDerivation (attrs // {
++ lib.optional stdenv.isDarwin darwin.libobjc ++ lib.optional stdenv.isDarwin darwin.libobjc
++ buildInputs; ++ buildInputs;
name = attrs.name or (namePrefix + gemName); name = attrs.name or "${namePrefix}${gemName}-${version}";
inherit src; inherit src;