Skip to content

Commit 57b1c9f

Browse files
authored
hashcat: add AMD ROCM support (#435291)
2 parents 6e3ed70 + b890e55 commit 57b1c9f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

pkgs/by-name/ha/hashcat/package.nix

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
ocl-icd,
1313
perl,
1414
python3,
15+
rocmPackages ? { },
16+
rocmSupport ? config.rocmSupport,
1517
xxHash,
1618
zlib,
1719
libiconv,
@@ -43,7 +45,7 @@ stdenv.mkDerivation rec {
4345
nativeBuildInputs = [
4446
makeWrapper
4547
]
46-
++ lib.optionals cudaSupport [
48+
++ lib.optionals (cudaSupport || rocmSupport) [
4749
addDriverRunpath
4850
];
4951

@@ -102,13 +104,16 @@ stdenv.mkDerivation rec {
102104
++ lib.optionals cudaSupport [
103105
"${cudaPackages.cudatoolkit}/lib"
104106
]
107+
++ lib.optionals rocmSupport [
108+
"${rocmPackages.clr}/lib"
109+
]
105110
);
106111
in
107112
''
108113
wrapProgram $out/bin/hashcat \
109114
--prefix LD_LIBRARY_PATH : ${lib.escapeShellArg LD_LIBRARY_PATH}
110115
''
111-
+ lib.optionalString cudaSupport ''
116+
+ lib.optionalString (cudaSupport || rocmSupport) ''
112117
for program in $out/bin/hashcat $out/bin/.hashcat-wrapped; do
113118
isELF "$program" || continue
114119
addDriverRunpath "$program"

0 commit comments

Comments
 (0)