hashcat: add AMD ROCM support (#435291)
This commit is contained in:
@@ -12,6 +12,8 @@
|
||||
ocl-icd,
|
||||
perl,
|
||||
python3,
|
||||
rocmPackages ? { },
|
||||
rocmSupport ? config.rocmSupport,
|
||||
xxHash,
|
||||
zlib,
|
||||
libiconv,
|
||||
@@ -43,7 +45,7 @@ stdenv.mkDerivation rec {
|
||||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
]
|
||||
++ lib.optionals cudaSupport [
|
||||
++ lib.optionals (cudaSupport || rocmSupport) [
|
||||
addDriverRunpath
|
||||
];
|
||||
|
||||
@@ -102,13 +104,16 @@ stdenv.mkDerivation rec {
|
||||
++ lib.optionals cudaSupport [
|
||||
"${cudaPackages.cudatoolkit}/lib"
|
||||
]
|
||||
++ lib.optionals rocmSupport [
|
||||
"${rocmPackages.clr}/lib"
|
||||
]
|
||||
);
|
||||
in
|
||||
''
|
||||
wrapProgram $out/bin/hashcat \
|
||||
--prefix LD_LIBRARY_PATH : ${lib.escapeShellArg LD_LIBRARY_PATH}
|
||||
''
|
||||
+ lib.optionalString cudaSupport ''
|
||||
+ lib.optionalString (cudaSupport || rocmSupport) ''
|
||||
for program in $out/bin/hashcat $out/bin/.hashcat-wrapped; do
|
||||
isELF "$program" || continue
|
||||
addDriverRunpath "$program"
|
||||
|
||||
Reference in New Issue
Block a user