diff options
author | Arthur Gautier <baloo@superbaloo.net> | 2021-05-11 12:01:35 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-11 14:01:35 +0200 |
commit | ab8e2e46d9e0e7be3158b473c4b59fec8f79287b (patch) | |
tree | 2f76d77a5a90408e282a8eec890682ce4d902b7f /pkgs/tools/security/hashcat | |
parent | 93123faae0281d2e97d12641a7cfad07c8028aff (diff) |
hashcat: fixup opencl support (#121961)
This fixes the following compilation error: ``` clBuildProgram(): CL_BUILD_PROGRAM_FAILURE /run/user/1000/comgr-64ff7f/input/CompileSource:2252:18: fatal error: cannot open file '/run/user/1000/comgr-64ff7f/input/inc_comp_multi_bs.cl': No such file or directory #include COMPARE_M ^ /run/user/1000/comgr-64ff7f/input/CompileSource:16:19: note: expanded from macro 'COMPARE_M' ^ 1 error generated. Error: Failed to compile opencl source (from CL or HIP source to LLVM IR). ``` Signed-off-by: Arthur Gautier <baloo@superbaloo.net>
Diffstat (limited to 'pkgs/tools/security/hashcat')
-rw-r--r-- | pkgs/tools/security/hashcat/default.nix | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pkgs/tools/security/hashcat/default.nix b/pkgs/tools/security/hashcat/default.nix index 173fdc8b18d29..ba46fbde2d628 100644 --- a/pkgs/tools/security/hashcat/default.nix +++ b/pkgs/tools/security/hashcat/default.nix @@ -28,7 +28,9 @@ stdenv.mkDerivation rec { preFixup = '' for f in $out/share/hashcat/OpenCL/*.cl; do + # Rewrite files to be included for compilation at runtime for opencl offload sed "s|#include \"\(.*\)\"|#include \"$out/share/hashcat/OpenCL/\1\"|g" -i "$f" + sed "s|#define COMPARE_\([SM]\) \"\(.*\.cl\)\"|#define COMPARE_\1 \"$out/share/hashcat/OpenCL/\2\"|g" -i "$f" done ''; |