Skip to content

Commit

Permalink
omnetpp: properly disable bundled tools on macos/x86_64
Browse files Browse the repository at this point in the history
we should NOT set the QT_PLUGIN_PATH manually in the setenv. it is already configured by the nix shell
  • Loading branch information
Rudolf Hornig committed Oct 17, 2024
1 parent 032c9ad commit c6d837b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions opp_env/database/omnetpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,11 @@ def make_omnetpp_project_description(version, base_version=None, is_modernized=F
"sed -i 's|GetCurrentProcess.*;||' src/qtenv/qtenv.cc" if version.startswith("6.0") and is_macos and is_aarch64 else None,
"sed -i 's|TransformProcessType.*;||' src/qtenv/qtenv.cc" if version.startswith("6.0") and is_macos and is_aarch64 else None,

# delete most bundled tools on macOS as they are not required when compiling under Nix (except the debugger helper)
"find tools/macos.x86_64/bin -mindepth 1 -not -name 'lldbmi2' -delete && (cd tools/macos.x86_64 && rm -rf doc include lib mkspecs plugins share)" if is_macos and is_x86_64 else None,
# delete and disable most bundled tools on macOS/x86_64 as they are not required when compiling under Nix (except the debugger helper)
"""find tools/macos.x86_64/bin -mindepth 1 -not -name 'lldbmi2' -delete && (cd tools/macos.x86_64 && rm -rf doc include lib mkspecs plugins share) ;
sed -i -e 's|export QT_PLUGIN_PATH|#export QT_PLUGIN_PATH|' -e 's|export BISON_PKGDATADIR|#export export BISON_PKGDATADIR|' setenv ;
sed -i -e 's|export PIP_PREFIX|#export PIP_PREFIX|' -e 's|export PYTHONNOUSERSITE|#export PYTHONNOUSERSITE|' setenv
""" if version < "6.1" and is_macos and is_x86_64 else None,

"sed -i 's|exit 1|# exit 1|' setenv" if not is_modernized and version.startswith("4.") else None, # otherwise setenv complains and exits
"sed -i 's|echo \"Error: not a login shell|# echo \"Error: not a login shell|' setenv" if not is_modernized and version.startswith("4.") else None, # otherwise setenv complains and exits
Expand Down

0 comments on commit c6d837b

Please sign in to comment.