2017-01-19 23:48:24 +00:00
|
|
|
{ stdenv, fetchurl, makeWrapper, opencl-headers, ocl-icd }:
|
2016-12-07 11:25:32 +00:00
|
|
|
|
|
|
|
assert stdenv.isLinux;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "hashcat-${version}";
|
|
|
|
version = "3.10";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
name = "${name}.tar.gz";
|
|
|
|
url = "https://hashcat.net/files_legacy/hashcat-${version}.tar.gz";
|
|
|
|
sha256 = "1sg30d9as6xsl7b0i7mz26igachbv0l0yimwb12nmarmgdgmwm9v";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ opencl-headers makeWrapper ];
|
|
|
|
|
|
|
|
makeFlags = [ "OPENCL_HEADERS_KHRONOS=${opencl-headers}/include" ];
|
|
|
|
|
|
|
|
# $out is not known until the build has started.
|
|
|
|
configurePhase = ''
|
2017-06-05 19:08:07 +01:00
|
|
|
runHook preConfigure
|
2016-12-07 11:25:32 +00:00
|
|
|
makeFlags="$makeFlags PREFIX=$out"
|
2017-06-05 19:08:07 +01:00
|
|
|
runHook postConfigure
|
2016-12-07 11:25:32 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
2017-01-19 23:48:24 +00:00
|
|
|
wrapProgram $out/bin/hashcat --prefix LD_LIBRARY_PATH : ${ocl-icd}/lib
|
2016-12-07 11:25:32 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Fast password cracker";
|
|
|
|
homepage = http://hashcat.net/hashcat/;
|
|
|
|
license = stdenv.lib.licenses.mit;
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.kierdavis ];
|
|
|
|
};
|
|
|
|
}
|