diff options
author | annalee <150648636+a-n-n-a-l-e-e@users.noreply.github.com> | 2023-11-26 08:42:40 +0000 |
---|---|---|
committer | annalee <150648636+a-n-n-a-l-e-e@users.noreply.github.com> | 2023-11-26 08:42:40 +0000 |
commit | 27e9083e8746d6f7fd8faf346d8e7fda1acbdbf3 (patch) | |
tree | 5d733eb6c595ec605d29c8b016e1d6aa1b01eac7 /pkgs/tools | |
parent | 94bd988819788873c4cb9c0d4850cba1eeac75d0 (diff) |
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.
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/security/hashcat/default.nix | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/tools/security/hashcat/default.nix b/pkgs/tools/security/hashcat/default.nix index 5a2304b5fd0bf..2e8370be85fe2 100644 --- a/pkgs/tools/security/hashcat/default.nix +++ b/pkgs/tools/security/hashcat/default.nix @@ -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' |