Escape all shell arguments uniformly

This commit is contained in:
zimbatm
2016-06-12 18:11:37 +01:00
parent 852e9c3096
commit 28fa4a2f03
9 changed files with 20 additions and 19 deletions

View File

@@ -18,8 +18,8 @@
# Normal gem packages can be used outside of bundler; a binstub is created in
# $out/bin.
{ lib, ruby, bundler, fetchurl, fetchgit, makeWrapper, git,
buildRubyGem, darwin
{ lib, fetchurl, fetchgit, makeWrapper, git, darwin
, ruby, bundler
} @ defs:
lib.makeOverridable (
@@ -53,7 +53,6 @@ lib.makeOverridable (
, ...} @ attrs:
let
shellEscape = x: "'${lib.replaceChars ["'"] [("'\\'" + "'")] x}'";
src = attrs.src or (
if type == "gem" then
fetchurl {
@@ -165,7 +164,7 @@ stdenv.mkDerivation (attrs // {
${src} \
${attrs.rev} \
${version} \
${shellEscape (toString buildFlags)}
${lib.escapeShellArgs buildFlags}
''}
${lib.optionalString (type == "gem") ''