Merge pull request #31100 from zimbatm/hashcat4

Hashcat4
This commit is contained in:
zimbatm 2017-11-02 11:23:07 +00:00 committed by GitHub
commit c34c737172
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 46 additions and 84 deletions

View File

@ -93,7 +93,7 @@ in
hardware.opengl.extraPackages = mkOption { hardware.opengl.extraPackages = mkOption {
type = types.listOf types.package; type = types.listOf types.package;
default = []; default = [];
example = literalExample "with pkgs; [ vaapiIntel libvdpau-va-gl vaapiVdpau ]"; example = literalExample "with pkgs; [ vaapiIntel libvdpau-va-gl vaapiVdpau intel-ocl ]";
description = '' description = ''
Additional packages to add to OpenGL drivers. This can be used Additional packages to add to OpenGL drivers. This can be used
to add OpenCL drivers, VA-API/VDPAU drivers etc. to add OpenCL drivers, VA-API/VDPAU drivers etc.

View File

@ -15,34 +15,34 @@
, mesa_noglu , mesa_noglu
, makeWrapper , makeWrapper
, beignet , beignet
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "beignet-${version}"; name = "beignet-${version}";
version = "1.3.1"; version = "1.3.2";
src = fetchurl { src = fetchurl {
url = "https://01.org/sites/default/files/${name}-source.tar.gz"; url = "https://01.org/sites/default/files/${name}-source.tar.gz";
sha256 = "07snrgjlhwl5fxz82dyqp632cnf5hp0gfqrjd2930jv79p37p6rr"; sha256 = "0hqb04jhjjslnmi3fnpzphanz84zywwkyw2sjr1k5qlx2jxfsmf5";
}; };
patches = [ ./clang_llvm.patch ]; patches = [ ./clang_llvm.patch ];
enableParallelBuilding = true; enableParallelBuilding = true;
postPatch = '' postPatch = ''
patchShebangs src/git_sha1.sh patchShebangs src/git_sha1.sh
''; '';
cmakeFlags = [ "-DCLANG_LIBRARY_DIR=${clang-unwrapped}/lib" ]; cmakeFlags = [ "-DCLANG_LIBRARY_DIR=${clang-unwrapped}/lib" ];
buildInputs = [ buildInputs = [
llvm llvm
clang-unwrapped clang-unwrapped
libX11 libX11
libXext libXext
libpthreadstubs libpthreadstubs
libdrm libdrm
libXdmcp libXdmcp
libXdamage libXdamage
ocl-icd ocl-icd
@ -105,7 +105,7 @@ stdenv.mkDerivation rec {
It supports the Intel OpenCL runtime library and compiler. It supports the Intel OpenCL runtime library and compiler.
''; '';
license = licenses.lgpl21Plus; license = licenses.lgpl21Plus;
maintainers = with maintainers; [ artuuge ]; maintainers = with maintainers; [ artuuge zimbatm ];
platforms = platforms.linux; platforms = platforms.linux;
}; };
} }

View File

@ -3,11 +3,12 @@
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "libva-intel-driver-1.7.3"; name = "intel-vaapi-driver-${version}";
version = "1.8.2";
src = fetchurl { src = fetchurl {
url = "http://www.freedesktop.org/software/vaapi/releases/libva-intel-driver/${name}.tar.bz2"; url = "http://www.freedesktop.org/software/vaapi/releases/libva-intel-driver/${name}.tar.bz2";
sha256 = "0dzryi9x873p9gikzcb9wzwqv2j3wssm0b85ws63vqjszpckgbbn"; sha256 = "00mpcvininwr5c4wyhp16s4bddg7vclxxjm2sfq5h7lifjcxyv46";
}; };
patchPhase = '' patchPhase = ''

View File

@ -1,12 +1,12 @@
{ stdenv, fetchzip, rpmextract, ncurses5, numactl, zlib }: { stdenv, fetchzip, rpmextract, ncurses5, numactl, zlib }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "r4.0-59481";
name = "intel-ocl-${version}"; name = "intel-ocl-${version}";
version = "5.0-63503";
src = fetchzip { src = fetchzip {
url = "https://software.intel.com/sites/default/files/managed/48/96/SRB4_linux64.zip"; url = "http://registrationcenter-download.intel.com/akdlm/irc_nas/11396/SRB5.0_linux64.zip";
sha256 = "1q69g28i6l7p13hnsk82g2qhdf2chwh4f0wvzac6xml67hna3v34"; sha256 = "0qbp63l74s0i80ysh9ya8x7r79xkddbbz4378nms9i7a0kprg9p2";
stripRoot = false; stripRoot = false;
}; };
@ -23,8 +23,8 @@ stdenv.mkDerivation rec {
postUnpack = '' postUnpack = ''
# Extract the RPMs contained within the source ZIP. # Extract the RPMs contained within the source ZIP.
rpmextract SRB4_linux64.zip/intel-opencl-${version}.x86_64.rpm rpmextract source/intel-opencl-r${version}.x86_64.rpm
rpmextract SRB4_linux64.zip/intel-opencl-cpu-${version}.x86_64.rpm rpmextract source/intel-opencl-cpu-r${version}.x86_64.rpm
''; '';
patchPhase = '' patchPhase = ''

View File

@ -1,40 +1,39 @@
{ stdenv, fetchurl, gmp }: { stdenv, fetchurl, makeWrapper, opencl-headers, ocl-icd }:
assert stdenv.isLinux;
let
bits = if stdenv.system == "x86_64-linux" then "64" else "32";
in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "hashcat-${version}"; name = "hashcat-${version}";
version = "2.00"; version = "4.0.0";
src = fetchurl { src = fetchurl {
name = "${name}.tar.gz"; url = "https://hashcat.net/files/hashcat-${version}.tar.gz";
url = "https://codeload.github.com/hashcat/hashcat/tar.gz/${version}"; sha256 = "0l1vq4h1gfxc2yclxkvy6gfz6sii2vyzip8pw6ifq930y8dvi34y";
sha256 = "0i2l4i1jkdhj9bkvycgd2nf809kki3jp83y0vrd4iwsdbbbyc9b3";
}; };
buildInputs = [ gmp ]; nativeBuildInputs = [ makeWrapper ];
buildInputs = [ opencl-headers ];
buildFlags = [ "posix${bits}" ] makeFlags = [
++ stdenv.lib.optionals (bits == "64") [ "posixXOP" "posixAVX" ]; "OPENCL_HEADERS_KHRONOS=${opencl-headers}/include"
"COMPTIME=1337"
"VERSION_TAG=${version}"
];
# Upstream Makefile doesn't have 'install' target # $out is not known until the build has started.
installPhase = '' configurePhase = ''
mkdir -p $out/bin $out/libexec runHook preConfigure
cp -R * $out/libexec makeFlags="$makeFlags PREFIX=$out"
runHook postConfigure
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 = { postFixup = ''
wrapProgram $out/bin/hashcat --prefix LD_LIBRARY_PATH : ${ocl-icd}/lib
'';
meta = with stdenv.lib; {
description = "Fast password cracker"; description = "Fast password cracker";
homepage = "https://hashcat.net/hashcat/"; homepage = https://hashcat.net/hashcat/;
license = stdenv.lib.licenses.mit; license = licenses.mit;
platforms = stdenv.lib.platforms.linux; platforms = platforms.linux;
maintainers = [ stdenv.lib.maintainers.thoughtpolice ]; maintainers = with maintainers; [ kierdavis zimbatm ];
}; };
} }

View File

@ -1,37 +0,0 @@
{ stdenv, fetchurl, makeWrapper, opencl-headers, ocl-icd }:
assert stdenv.isLinux;
stdenv.mkDerivation rec {
name = "hashcat-${version}";
version = "3.6.0";
src = fetchurl {
url = "https://hashcat.net/files/hashcat-${version}.tar.gz";
sha256 = "127hdvq6ikah7r5vch63jnnkcsj7y61f9h8x79c3w25x9w55bxry";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ opencl-headers ];
makeFlags = [ "OPENCL_HEADERS_KHRONOS=${opencl-headers}/include" ];
# $out is not known until the build has started.
configurePhase = ''
runHook preConfigure
makeFlags="$makeFlags PREFIX=$out"
runHook postConfigure
'';
postFixup = ''
wrapProgram $out/bin/hashcat --prefix LD_LIBRARY_PATH : ${ocl-icd}/lib
'';
meta = {
description = "Fast password cracker";
homepage = https://hashcat.net/hashcat/;
license = stdenv.lib.licenses.mit;
platforms = stdenv.lib.platforms.linux;
maintainers = [ stdenv.lib.maintainers.kierdavis ];
};
}

View File

@ -2525,7 +2525,6 @@ with pkgs;
hardlink = callPackage ../tools/system/hardlink { }; hardlink = callPackage ../tools/system/hardlink { };
hashcat = callPackage ../tools/security/hashcat { }; hashcat = callPackage ../tools/security/hashcat { };
hashcat3 = callPackage ../tools/security/hashcat/hashcat3 { };
hash-slinger = callPackage ../tools/security/hash-slinger { }; hash-slinger = callPackage ../tools/security/hash-slinger { };