1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/tools/security/hashcat/default.nix
Bjørn Forsman 800042b310 hashcat: 0.49 -> 2.00
The current URL is broken, upstream has moved the download from .../files/ to
.../files_legacy/. But after fixing that, starting hashcat results in:

  $ ./result/bin/hashcat
  ERROR: this copy of hashcat is outdated. Get a more recent version.

So just update to latest.

New releases are on github, the license is now MIT and there are build
system changes.
2016-05-10 22:11:12 +02:00

41 lines
1.1 KiB
Nix

{ stdenv, fetchurl, gmp }:
assert stdenv.isLinux;
let
bits = if stdenv.system == "x86_64-linux" then "64" else "32";
in
stdenv.mkDerivation rec {
name = "hashcat-${version}";
version = "2.00";
src = fetchurl {
name = "${name}.tar.gz";
url = "https://codeload.github.com/hashcat/hashcat/tar.gz/${version}";
sha256 = "0i2l4i1jkdhj9bkvycgd2nf809kki3jp83y0vrd4iwsdbbbyc9b3";
};
buildInputs = [ gmp ];
buildFlags = [ "posix${bits}" ]
++ stdenv.lib.optionals (bits == "64") [ "posixXOP" "posixAVX" ];
# Upstream Makefile doesn't have 'install' target
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/";
license = stdenv.lib.licenses.mit;
platforms = stdenv.lib.platforms.linux;
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
};
}