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

38 lines
996 B
Nix
Raw Normal View History

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