diff options
author | Bjørn Forsman <bjorn.forsman@gmail.com> | 2016-05-10 22:11:12 +0200 |
---|---|---|
committer | Bjørn Forsman <bjorn.forsman@gmail.com> | 2016-05-10 22:11:12 +0200 |
commit | 800042b310d43814837dc4be4dccb152da338f76 (patch) | |
tree | a81f0f23e1416b29535e53614d857fc7a6e535ac /pkgs/tools/security/hashcat | |
parent | 173728069b3c273afa176b0ed8733725b61ada6d (diff) |
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.
Diffstat (limited to 'pkgs/tools/security/hashcat')
-rw-r--r-- | pkgs/tools/security/hashcat/default.nix | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/pkgs/tools/security/hashcat/default.nix b/pkgs/tools/security/hashcat/default.nix index 3a4a6edef0373..fdd49cc3c271f 100644 --- a/pkgs/tools/security/hashcat/default.nix +++ b/pkgs/tools/security/hashcat/default.nix @@ -1,49 +1,39 @@ -{ stdenv, fetchurl, p7zip, patchelf, gmp }: +{ stdenv, fetchurl, gmp }: assert stdenv.isLinux; let - bits = if stdenv.system == "x86_64-linux" then "64" else "32"; - libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.libc gmp ]; - - fixBin = x: '' - patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath ${libPath} ${x} - ''; + bits = if stdenv.system == "x86_64-linux" then "64" else "32"; in stdenv.mkDerivation rec { name = "hashcat-${version}"; - version = "0.49"; + version = "2.00"; src = fetchurl { - url = "http://hashcat.net/files/${name}.7z"; - sha256 = "0va07flncihgmnri5wj0jn636w86x5qwm4jmj2halcyg7qwqijh2"; + name = "${name}.tar.gz"; + url = "https://codeload.github.com/hashcat/hashcat/tar.gz/${version}"; + sha256 = "0i2l4i1jkdhj9bkvycgd2nf809kki3jp83y0vrd4iwsdbbbyc9b3"; }; - buildInputs = [ p7zip patchelf ]; + buildInputs = [ gmp ]; - unpackPhase = "7z x $src > /dev/null && cd ${name}"; + 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 - 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; + license = stdenv.lib.licenses.mit; platforms = stdenv.lib.platforms.linux; maintainers = [ stdenv.lib.maintainers.thoughtpolice ]; }; |