summary refs log tree commit diff
path: root/pkgs/development/ruby-modules
diff options
context:
space:
mode:
authorBurke Libbey <burke@libbey.me>2019-12-16 17:50:56 -0500
committerAlyssa Ross <hi@alyssa.is>2019-12-17 00:58:32 +0000
commit62e680cdcf40da86b1f47e7f59a2716820ff1e3c (patch)
treed78a8e3cce0874942b862b6acd7713e3223c184a /pkgs/development/ruby-modules
parentdb59e94059480134b99da9815597b7cc2bf53e81 (diff)
downloadnixpkgs-62e680cdcf40da86b1f47e7f59a2716820ff1e3c.tar
nixpkgs-62e680cdcf40da86b1f47e7f59a2716820ff1e3c.tar.gz
nixpkgs-62e680cdcf40da86b1f47e7f59a2716820ff1e3c.tar.bz2
nixpkgs-62e680cdcf40da86b1f47e7f59a2716820ff1e3c.tar.lz
nixpkgs-62e680cdcf40da86b1f47e7f59a2716820ff1e3c.tar.xz
nixpkgs-62e680cdcf40da86b1f47e7f59a2716820ff1e3c.tar.zst
nixpkgs-62e680cdcf40da86b1f47e7f59a2716820ff1e3c.zip
ruby-modules: parse build_flags correctly:
In building a gem whose native extension is a Rakefile, the previous
version of this code will call essentially `rake ""`, when it means to
call `rake`.

This change converts `""` into `[]` rather than `[""]`.
Diffstat (limited to 'pkgs/development/ruby-modules')
-rw-r--r--pkgs/development/ruby-modules/gem/nix-bundle-install.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkgs/development/ruby-modules/gem/nix-bundle-install.rb b/pkgs/development/ruby-modules/gem/nix-bundle-install.rb
index 142d2da9bee..0d501bd9add 100644
--- a/pkgs/development/ruby-modules/gem/nix-bundle-install.rb
+++ b/pkgs/development/ruby-modules/gem/nix-bundle-install.rb
@@ -5,6 +5,7 @@ require 'rubygems/command'
 require 'fileutils'
 require 'pathname'
 require 'tmpdir'
+require 'shellwords'
 
 if defined?(Encoding.default_internal)
   Encoding.default_internal = Encoding::UTF_8
@@ -31,7 +32,7 @@ bin_dir = File.join(ENV["out"], "bin")
 type        = ARGV[0]
 name        = ARGV[1]
 version     = ARGV[2]
-build_flags = ARGV[3]
+build_flags = Shellwords.split(ARGV[3])
 if type == "git"
   uri         = ARGV[4]
   REPO        = ARGV[5]
@@ -117,7 +118,7 @@ else
   source = Bundler::Source::Path.new(options)
 end
 spec = source.specs.search_all(name).first
-Bundler.rubygems.with_build_args [build_flags] do
+Bundler.rubygems.with_build_args build_flags do
   source.install(spec)
 end