hashcat: Fix OpenCL support for ROCm

Fix OpenCL issue like darktable did.

Confirm that `hashcat -b -m 2500` can be successfully executed on
ROCm/RX 580.
This commit is contained in:
fasheng 2021-02-22 09:37:51 +08:00 committed by Xu Fasheng
parent 3c657313c3
commit c1d56239b8

View file

@ -26,6 +26,12 @@ stdenv.mkDerivation rec {
"USE_SYSTEM_XXHASH=1"
];
preFixup = ''
for f in $out/share/hashcat/OpenCL/*.cl; do
sed "s|#include \"\(.*\)\"|#include \"$out/share/hashcat/OpenCL/\1\"|g" -i "$f"
done
'';
postFixup = ''
wrapProgram $out/bin/hashcat --prefix LD_LIBRARY_PATH : ${ocl-icd}/lib
'';