2016-05-10 22:11:12 +02:00
|
|
|
{ stdenv, fetchurl, gmp }:
|
2014-03-31 17:56:02 +02:00
|
|
|
|
2014-08-22 11:57:40 +02:00
|
|
|
assert stdenv.isLinux;
|
|
|
|
|
2014-03-31 17:56:02 +02:00
|
|
|
let
|
2016-05-10 22:11:12 +02:00
|
|
|
bits = if stdenv.system == "x86_64-linux" then "64" else "32";
|
2014-03-31 17:56:02 +02:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "hashcat-${version}";
|
2016-05-10 22:11:12 +02:00
|
|
|
version = "2.00";
|
2014-03-31 17:56:02 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2016-05-10 22:11:12 +02:00
|
|
|
name = "${name}.tar.gz";
|
|
|
|
url = "https://codeload.github.com/hashcat/hashcat/tar.gz/${version}";
|
|
|
|
sha256 = "0i2l4i1jkdhj9bkvycgd2nf809kki3jp83y0vrd4iwsdbbbyc9b3";
|
2014-03-31 17:56:02 +02:00
|
|
|
};
|
|
|
|
|
2016-05-10 22:11:12 +02:00
|
|
|
buildInputs = [ gmp ];
|
2014-03-31 17:56:02 +02:00
|
|
|
|
2016-05-10 22:11:12 +02:00
|
|
|
buildFlags = [ "posix${bits}" ]
|
|
|
|
++ stdenv.lib.optionals (bits == "64") [ "posixXOP" "posixAVX" ];
|
2014-03-31 17:56:02 +02:00
|
|
|
|
2016-05-10 22:11:12 +02:00
|
|
|
# Upstream Makefile doesn't have 'install' target
|
2014-03-31 17:56:02 +02:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin $out/libexec
|
|
|
|
cp -R * $out/libexec
|
|
|
|
|
|
|
|
ln -s $out/libexec/hashcat-cli${bits}.bin $out/bin/hashcat
|
|
|
|
ln -s $out/libexec/hashcat-cliXOP.bin $out/bin/hashcat-xop
|
|
|
|
ln -s $out/libexec/hashcat-cliAVX.bin $out/bin/hashcat-avx
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Fast password cracker";
|
|
|
|
homepage = "http://hashcat.net/hashcat/";
|
2016-05-10 22:11:12 +02:00
|
|
|
license = stdenv.lib.licenses.mit;
|
2014-03-31 17:56:02 +02:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
|
|
|
|
};
|
|
|
|
}
|