buildRubyGem: do not patch shebangs in non-existent directory

This commit is contained in:
Ivan Trubach
2024-06-03 21:14:44 +03:00
parent 30971173ab
commit aa8b17baf3
@@ -258,7 +258,9 @@ stdenv.mkDerivation ((builtins.removeAttrs attrs ["source"]) // {
# store.
fixupPhase = attrs.fixupPhase or ''
runHook preFixup
patchShebangs --update --host $out/${ruby.gemPath}/bin
if [[ -d $out/${ruby.gemPath}/bin ]]; then
patchShebangs --update --host $out/${ruby.gemPath}/bin
fi
runHook postFixup
'';