diff options
author | zimbatm <zimbatm@zimbatm.com> | 2017-11-02 11:23:07 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-02 11:23:07 +0000 |
commit | c34c737172acb3688717d17889a1f15183162e75 (patch) | |
tree | a5cb7600947e17b84e9883fe5daee88266aa11e8 /pkgs/tools | |
parent | 68b5ec06b90406e81a2ff059f02fc25bf63b82af (diff) | |
parent | 309373ea68839fa28d61fc84c982a4b5c08322cf (diff) | |
download | nixlib-c34c737172acb3688717d17889a1f15183162e75.tar nixlib-c34c737172acb3688717d17889a1f15183162e75.tar.gz nixlib-c34c737172acb3688717d17889a1f15183162e75.tar.bz2 nixlib-c34c737172acb3688717d17889a1f15183162e75.tar.lz nixlib-c34c737172acb3688717d17889a1f15183162e75.tar.xz nixlib-c34c737172acb3688717d17889a1f15183162e75.tar.zst nixlib-c34c737172acb3688717d17889a1f15183162e75.zip |
Merge pull request #31100 from zimbatm/hashcat4
Hashcat4
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/security/hashcat/default.nix | 49 | ||||
-rw-r--r-- | pkgs/tools/security/hashcat/hashcat3/default.nix | 37 |
2 files changed, 24 insertions, 62 deletions
diff --git a/pkgs/tools/security/hashcat/default.nix b/pkgs/tools/security/hashcat/default.nix index 298dd336be1f..81c92415c509 100644 --- a/pkgs/tools/security/hashcat/default.nix +++ b/pkgs/tools/security/hashcat/default.nix @@ -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 { name = "hashcat-${version}"; - version = "2.00"; + version = "4.0.0"; src = fetchurl { - name = "${name}.tar.gz"; - url = "https://codeload.github.com/hashcat/hashcat/tar.gz/${version}"; - sha256 = "0i2l4i1jkdhj9bkvycgd2nf809kki3jp83y0vrd4iwsdbbbyc9b3"; + url = "https://hashcat.net/files/hashcat-${version}.tar.gz"; + sha256 = "0l1vq4h1gfxc2yclxkvy6gfz6sii2vyzip8pw6ifq930y8dvi34y"; }; - buildInputs = [ gmp ]; + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ opencl-headers ]; - buildFlags = [ "posix${bits}" ] - ++ stdenv.lib.optionals (bits == "64") [ "posixXOP" "posixAVX" ]; + makeFlags = [ + "OPENCL_HEADERS_KHRONOS=${opencl-headers}/include" + "COMPTIME=1337" + "VERSION_TAG=${version}" + ]; - # Upstream Makefile doesn't have 'install' target - installPhase = '' - mkdir -p $out/bin $out/libexec - cp -R * $out/libexec + # $out is not known until the build has started. + configurePhase = '' + runHook preConfigure + 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 + postFixup = '' + wrapProgram $out/bin/hashcat --prefix LD_LIBRARY_PATH : ${ocl-icd}/lib ''; - meta = { + meta = with stdenv.lib; { description = "Fast password cracker"; - homepage = "https://hashcat.net/hashcat/"; - license = stdenv.lib.licenses.mit; - platforms = stdenv.lib.platforms.linux; - maintainers = [ stdenv.lib.maintainers.thoughtpolice ]; + homepage = https://hashcat.net/hashcat/; + license = licenses.mit; + platforms = platforms.linux; + maintainers = with maintainers; [ kierdavis zimbatm ]; }; } diff --git a/pkgs/tools/security/hashcat/hashcat3/default.nix b/pkgs/tools/security/hashcat/hashcat3/default.nix deleted file mode 100644 index 7a0d7241bbf9..000000000000 --- a/pkgs/tools/security/hashcat/hashcat3/default.nix +++ /dev/null @@ -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 ]; - }; -} |