Prevent install_name_tool from causing a failure when it encounters a non-Mach-O file (e.g.: a bash script).

This commit is contained in:
Ryan Trinkle 2014-08-27 13:15:33 -04:00
parent 81a5395c23
commit bc92dcd08c

View File

@ -259,8 +259,7 @@ in
${optionalString (self.enableSharedExecutables && self.isExecutable && self.stdenv.isDarwin) ''
for exe in $out/bin/* ; do
install_name_tool -add_rpath \
$out/lib/${ghc.ghc.name}/${self.pname}-${self.version} $exe
install_name_tool -add_rpath $out/lib/${ghc.ghc.name}/${self.pname}-${self.version} $exe || true # Ignore failures, which seem to be due to hitting bash scripts rather than binaries
done
''}