Escape all shell arguments uniformly
This commit is contained in:
@@ -16,8 +16,6 @@
|
||||
}@args:
|
||||
|
||||
let
|
||||
|
||||
shellEscape = x: "'${lib.replaceChars ["'"] [("'\\'" + "'")] x}'";
|
||||
importedGemset = import gemset;
|
||||
filteredGemset = (lib.filterAttrs (name: attrs:
|
||||
if (builtins.hasAttr "groups" attrs)
|
||||
@@ -58,8 +56,8 @@ let
|
||||
"${confFiles}/Gemfile" \
|
||||
"$out/${ruby.gemPath}" \
|
||||
"${bundler}/${ruby.gemPath}" \
|
||||
${shellEscape (toString envPaths)} \
|
||||
${shellEscape (toString groups)}
|
||||
${lib.escapeShellArg envPaths} \
|
||||
${lib.escapeShellArg groups}
|
||||
'' + lib.optionalString (postBuild != null) postBuild;
|
||||
passthru = rec {
|
||||
inherit ruby bundler meta gems;
|
||||
|
||||
@@ -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") ''
|
||||
|
||||
Reference in New Issue
Block a user