Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

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.

+11 -21
+11 -21
pkgs/tools/security/hashcat/default.nix
··· 1 - { stdenv, fetchurl, p7zip, patchelf, gmp }: 2 3 assert stdenv.isLinux; 4 5 let 6 - bits = if stdenv.system == "x86_64-linux" then "64" else "32"; 7 - libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.libc gmp ]; 8 - 9 - fixBin = x: '' 10 - patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 11 - --set-rpath ${libPath} ${x} 12 - ''; 13 in 14 stdenv.mkDerivation rec { 15 name = "hashcat-${version}"; 16 - version = "0.49"; 17 18 src = fetchurl { 19 - url = "http://hashcat.net/files/${name}.7z"; 20 - sha256 = "0va07flncihgmnri5wj0jn636w86x5qwm4jmj2halcyg7qwqijh2"; 21 }; 22 23 - buildInputs = [ p7zip patchelf ]; 24 25 - unpackPhase = "7z x $src > /dev/null && cd ${name}"; 26 27 installPhase = '' 28 mkdir -p $out/bin $out/libexec 29 cp -R * $out/libexec 30 31 - echo -n "/" > $out/bin/eula.accepted 32 ln -s $out/libexec/hashcat-cli${bits}.bin $out/bin/hashcat 33 ln -s $out/libexec/hashcat-cliXOP.bin $out/bin/hashcat-xop 34 ln -s $out/libexec/hashcat-cliAVX.bin $out/bin/hashcat-avx 35 ''; 36 37 - fixupPhase = '' 38 - ${fixBin "$out/libexec/hashcat-cli${bits}.bin"} 39 - ${fixBin "$out/libexec/hashcat-cliXOP.bin"} 40 - ${fixBin "$out/libexec/hashcat-cliAVX.bin"} 41 - ''; 42 - 43 meta = { 44 description = "Fast password cracker"; 45 homepage = "http://hashcat.net/hashcat/"; 46 - license = stdenv.lib.licenses.unfreeRedistributable; 47 platforms = stdenv.lib.platforms.linux; 48 maintainers = [ stdenv.lib.maintainers.thoughtpolice ]; 49 };
··· 1 + { stdenv, fetchurl, gmp }: 2 3 assert stdenv.isLinux; 4 5 let 6 + bits = if stdenv.system == "x86_64-linux" then "64" else "32"; 7 in 8 stdenv.mkDerivation rec { 9 name = "hashcat-${version}"; 10 + version = "2.00"; 11 12 src = fetchurl { 13 + name = "${name}.tar.gz"; 14 + url = "https://codeload.github.com/hashcat/hashcat/tar.gz/${version}"; 15 + sha256 = "0i2l4i1jkdhj9bkvycgd2nf809kki3jp83y0vrd4iwsdbbbyc9b3"; 16 }; 17 18 + buildInputs = [ gmp ]; 19 20 + buildFlags = [ "posix${bits}" ] 21 + ++ stdenv.lib.optionals (bits == "64") [ "posixXOP" "posixAVX" ]; 22 23 + # Upstream Makefile doesn't have 'install' target 24 installPhase = '' 25 mkdir -p $out/bin $out/libexec 26 cp -R * $out/libexec 27 28 ln -s $out/libexec/hashcat-cli${bits}.bin $out/bin/hashcat 29 ln -s $out/libexec/hashcat-cliXOP.bin $out/bin/hashcat-xop 30 ln -s $out/libexec/hashcat-cliAVX.bin $out/bin/hashcat-avx 31 ''; 32 33 meta = { 34 description = "Fast password cracker"; 35 homepage = "http://hashcat.net/hashcat/"; 36 + license = stdenv.lib.licenses.mit; 37 platforms = stdenv.lib.platforms.linux; 38 maintainers = [ stdenv.lib.maintainers.thoughtpolice ]; 39 };