buildRubyGem: do not override fixupPhase (#323587)

Oops, looks like we were overriding stdenv’s fixupPhase that runs
fixupOutputHooks, including patchShebangsAuto.
This commit is contained in:
Ivan Trubach 2024-07-05 20:29:51 +03:00 committed by GitHub
parent 3dd6684936
commit 4dec9be42a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -251,19 +251,15 @@ stdenv.mkDerivation ((builtins.removeAttrs attrs ["source"]) // {
done
''}
runHook postInstall
'';
# For Ruby-generated binstubs, shebang paths are already in Nix store but for
# ruby used to build the package. Update them to match the host system. Note
# that patchShebangsAuto ignores scripts where shebang line is already in Nix
# store.
fixupPhase = attrs.fixupPhase or ''
runHook preFixup
if [[ -d $out/${ruby.gemPath}/bin ]]; then
patchShebangs --update --host $out/${ruby.gemPath}/bin
# For Ruby-generated binstubs, shebang paths are already in Nix store but for
# ruby used to build the package. Update them to match the host system. Note
# that patchShebangsAuto ignores scripts where shebang line is already in Nix
# store.
if [[ -d $GEM_HOME/bin ]]; then
patchShebangs --update --host -- "$GEM_HOME"/bin
fi
runHook postFixup
runHook postInstall
'';
propagatedBuildInputs = gemPath ++ propagatedBuildInputs;