hashcat: fix darwin build
use libc++ libc++abi, not libstdc++, when stdenv.cc.libcxx is non null MACOSX_DEPLOYMENT_TARGET is defined by the environment, comment out the definition in the Makefile as it breaks the c++ build.
This commit is contained in:
parent
94bd988819
commit
27e9083e87
1 changed files with 6 additions and 0 deletions
|
@ -21,8 +21,14 @@ stdenv.mkDerivation rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
# Select libstdc++ or libc++ based on stdenv
|
||||||
|
# MACOSX_DEPLOYMENT_TARGET is defined by the enviroment
|
||||||
# Remove hardcoded paths on darwin
|
# Remove hardcoded paths on darwin
|
||||||
substituteInPlace src/Makefile \
|
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/ar" "ar" \
|
||||||
--replace "/usr/bin/sed" "sed" \
|
--replace "/usr/bin/sed" "sed" \
|
||||||
--replace '-i ""' '-i'
|
--replace '-i ""' '-i'
|
||||||
|
|
Loading…
Reference in a new issue