2017-11-01 16:05:10 +01:00
|
|
|
{ stdenv, fetchurl, makeWrapper, opencl-headers, ocl-icd }:
|
2014-03-31 17:56:02 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "hashcat-${version}";
|
2017-11-01 16:05:10 +01:00
|
|
|
version = "4.0.0";
|
2014-03-31 17:56:02 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-11-01 16:05:10 +01:00
|
|
|
url = "https://hashcat.net/files/hashcat-${version}.tar.gz";
|
|
|
|
sha256 = "0l1vq4h1gfxc2yclxkvy6gfz6sii2vyzip8pw6ifq930y8dvi34y";
|
2014-03-31 17:56:02 +02:00
|
|
|
};
|
|
|
|
|
2017-11-01 16:05:10 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ opencl-headers ];
|
2014-03-31 17:56:02 +02:00
|
|
|
|
2017-11-01 16:05:10 +01:00
|
|
|
makeFlags = [
|
|
|
|
"OPENCL_HEADERS_KHRONOS=${opencl-headers}/include"
|
|
|
|
"COMPTIME=1337"
|
|
|
|
"VERSION_TAG=${version}"
|
|
|
|
];
|
2014-03-31 17:56:02 +02:00
|
|
|
|
2017-11-01 16:05:10 +01:00
|
|
|
# $out is not known until the build has started.
|
|
|
|
configurePhase = ''
|
|
|
|
runHook preConfigure
|
|
|
|
makeFlags="$makeFlags PREFIX=$out"
|
|
|
|
runHook postConfigure
|
|
|
|
'';
|
2014-03-31 17:56:02 +02:00
|
|
|
|
2017-11-01 16:05:10 +01:00
|
|
|
postFixup = ''
|
|
|
|
wrapProgram $out/bin/hashcat --prefix LD_LIBRARY_PATH : ${ocl-icd}/lib
|
2014-03-31 17:56:02 +02:00
|
|
|
'';
|
|
|
|
|
2017-11-01 16:05:10 +01:00
|
|
|
meta = with stdenv.lib; {
|
2014-03-31 17:56:02 +02:00
|
|
|
description = "Fast password cracker";
|
2017-11-01 16:05:10 +01:00
|
|
|
homepage = https://hashcat.net/hashcat/;
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ kierdavis zimbatm ];
|
2014-03-31 17:56:02 +02:00
|
|
|
};
|
|
|
|
}
|