diff options
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/swift/compiler/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/compilers/swift/compiler/default.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nixpkgs/pkgs/development/compilers/swift/compiler/default.nix b/nixpkgs/pkgs/development/compilers/swift/compiler/default.nix index 821d61229d8d..30fb18db8fd2 100644 --- a/nixpkgs/pkgs/development/compilers/swift/compiler/default.nix +++ b/nixpkgs/pkgs/development/compilers/swift/compiler/default.nix @@ -2,6 +2,7 @@ , stdenv , callPackage , cmake +, bash , coreutils , gnugrep , perl @@ -133,7 +134,8 @@ let sed < '${clang}/bin/clang' > "$targetFile" \ -e 's|^\s*exec|exec -a "$0"|g' \ -e 's|^\[\[ "${clang.cc}/bin/clang" = \*++ ]]|[[ "$0" = *++ ]]|' \ - -e "s|${clang.cc}/bin/clang|$unwrappedClang|g" + -e "s|${clang.cc}/bin/clang|$unwrappedClang|g" \ + -e "s|^\(\s*\)\($unwrappedClang\) \"@\\\$responseFile\"|\1argv0=\$0\n\1${bash}/bin/bash -c \"exec -a '\$argv0' \2 '@\$responseFile'\"|" chmod a+x "$targetFile" ''; |