Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions pkgs/development/ruby-modules/gem/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down