nixpkgs/pkgs/tools/security/hashcat/default.nix

40 lines
1.0 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, makeWrapper, opencl-headers, ocl-icd }:
stdenv.mkDerivation rec {
name = "hashcat-${version}";
2018-03-04 08:20:40 +00:00
version = "4.1.0";
src = fetchurl {
url = "https://hashcat.net/files/hashcat-${version}.tar.gz";
2018-03-04 08:20:40 +00:00
sha256 = "170i2y32ykgzb1qf1wz3klwn31c09bviz4x3bnrwia65adqrj8xx";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ opencl-headers ];
makeFlags = [
"OPENCL_HEADERS_KHRONOS=${opencl-headers}/include"
"COMPTIME=1337"
"VERSION_TAG=${version}"
];
# $out is not known until the build has started.
configurePhase = ''
runHook preConfigure
makeFlags="$makeFlags PREFIX=$out"
runHook postConfigure
'';
postFixup = ''
wrapProgram $out/bin/hashcat --prefix LD_LIBRARY_PATH : ${ocl-icd}/lib
'';
meta = with stdenv.lib; {
description = "Fast password cracker";
homepage = https://hashcat.net/hashcat/;
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ kierdavis zimbatm ];
};
}