diff options
author | Austin Seipp <aseipp@pobox.com> | 2014-03-31 10:56:02 -0500 |
---|---|---|
committer | Austin Seipp <aseipp@pobox.com> | 2014-03-31 10:56:02 -0500 |
commit | cff179f829650be1de32f030dfb73c7b8284ed76 (patch) | |
tree | 09654c8aea56c5f3e71b3566cdf00d99dbbd0f7e /pkgs/tools/security/hashcat | |
parent | 8d965e3a47bd0e076a6d4996933c822b71e400fe (diff) |
hashcat: version 0.47
Signed-off-by: Austin Seipp <aseipp@pobox.com>
Diffstat (limited to 'pkgs/tools/security/hashcat')
-rw-r--r-- | pkgs/tools/security/hashcat/default.nix | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/pkgs/tools/security/hashcat/default.nix b/pkgs/tools/security/hashcat/default.nix new file mode 100644 index 0000000000000..5e17372419040 --- /dev/null +++ b/pkgs/tools/security/hashcat/default.nix @@ -0,0 +1,48 @@ +{ stdenv, fetchurl, p7zip, patchelf }: + +let + bits = if stdenv.system == "x86_64-linux" then "64" else "32"; + libPath = stdenv.lib.makeLibraryPath [ stdenv.gcc.libc ]; + + fixBin = x: '' + patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \ + --set-rpath ${libPath} ${x} + ''; +in +stdenv.mkDerivation rec { + name = "hashcat-${version}"; + version = "0.47"; + + src = fetchurl { + url = "http://hashcat.net/files/${name}.7z"; + sha256 = "0mc4lv4qfxabp794xfzgr63fhwk7lvbg12pry8a96lldp0jwp6i3"; + }; + + buildInputs = [ p7zip patchelf ]; + + unpackPhase = "7z x $src > /dev/null && cd ${name}"; + + installPhase = '' + mkdir -p $out/bin $out/libexec + cp -R * $out/libexec + + echo -n "/" > $out/bin/eula.accepted + 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 + ''; + + fixupPhase = '' + ${fixBin "$out/libexec/hashcat-cli${bits}.bin"} + ${fixBin "$out/libexec/hashcat-cliXOP.bin"} + ${fixBin "$out/libexec/hashcat-cliAVX.bin"} + ''; + + meta = { + description = "Fast password cracker"; + homepage = "http://hashcat.net/hashcat/"; + license = stdenv.lib.licenses.unfreeRedistributable; + platforms = stdenv.lib.platforms.linux; + maintainers = [ stdenv.lib.maintainers.thoughtpolice ]; + }; +} |