Merge pull request #270065 from a-n-n-a-l-e-e/hashcat-darwin-fix

hashcat: fix darwin build
This commit is contained in:
Robert Scott 2023-11-26 18:08:29 +00:00 committed by GitHub
commit b016575818
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,8 +21,14 @@ stdenv.mkDerivation rec {
};
postPatch = ''
# Select libstdc++ or libc++ based on stdenv
# MACOSX_DEPLOYMENT_TARGET is defined by the enviroment
# Remove hardcoded paths on darwin
substituteInPlace src/Makefile \
'' + lib.optionalString (stdenv.cc.libcxx != null) ''
--replace "-lstdc++" "-lc++ -l${stdenv.cc.libcxx.cxxabi.libName}" \
'' + ''
--replace "export MACOSX_DEPLOYMENT_TARGET" "#export MACOSX_DEPLOYMENT_TARGET" \
--replace "/usr/bin/ar" "ar" \
--replace "/usr/bin/sed" "sed" \
--replace '-i ""' '-i'